diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index fcc80d58a9..fbcb2808ae 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -553,8 +553,8 @@ namespace Config if (reader->ReadSection("plugin")) { auto model = &gConfigPlugin; - model->enable_hot_reloading = reader->GetBoolean("enable_hot_reloading", false); - model->allowed_hosts = reader->GetString("allowed_hosts", ""); + model->EnableHotReloading = reader->GetBoolean("enable_hot_reloading", false); + model->AllowedHosts = reader->GetString("allowed_hosts", ""); } } @@ -562,8 +562,8 @@ namespace Config { auto model = &gConfigPlugin; writer->WriteSection("plugin"); - writer->WriteBoolean("enable_hot_reloading", model->enable_hot_reloading); - writer->WriteString("allowed_hosts", model->allowed_hosts); + writer->WriteBoolean("enable_hot_reloading", model->EnableHotReloading); + writer->WriteString("allowed_hosts", model->AllowedHosts); } static bool SetDefaults() diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index d6a1513eb8..844da4cf47 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -216,8 +216,8 @@ struct FontConfiguration struct PluginConfiguration { - bool enable_hot_reloading; - std::string allowed_hosts; + bool EnableHotReloading; + std::string AllowedHosts; }; enum class Sort : int32_t diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index 901a4e5419..e2407c27be 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -555,7 +555,7 @@ void ScriptEngine::RefreshPlugins() } // Turn on hot reload if not already enabled - if (!_hotReloadingInitialised && gConfigPlugin.enable_hot_reloading && network_get_mode() == NETWORK_MODE_NONE) + if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && network_get_mode() == NETWORK_MODE_NONE) { SetupHotReloading(); } diff --git a/src/openrct2/scripting/bindings/network/ScSocket.hpp b/src/openrct2/scripting/bindings/network/ScSocket.hpp index 9e0d5b820f..15febcd85a 100644 --- a/src/openrct2/scripting/bindings/network/ScSocket.hpp +++ b/src/openrct2/scripting/bindings/network/ScSocket.hpp @@ -90,15 +90,15 @@ namespace OpenRCT2::Scripting constexpr char delimiter = ','; size_t start_pos = 0; size_t end_pos = 0; - while ((end_pos = gConfigPlugin.allowed_hosts.find(delimiter, start_pos)) != std::string::npos) + while ((end_pos = gConfigPlugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos) { - if (host == gConfigPlugin.allowed_hosts.substr(start_pos, end_pos - start_pos)) + if (host == gConfigPlugin.AllowedHosts.substr(start_pos, end_pos - start_pos)) { return true; } start_pos = end_pos + 1; } - return host == gConfigPlugin.allowed_hosts.substr(start_pos, gConfigPlugin.allowed_hosts.length() - start_pos); + return host == gConfigPlugin.AllowedHosts.substr(start_pos, gConfigPlugin.AllowedHosts.length() - start_pos); } public: