From e603fe83c2d63d0f25d43e0130adb4a80e6f0f22 Mon Sep 17 00:00:00 2001 From: skuzzis Date: Sun, 5 Jan 2025 15:06:05 +0200 Subject: [PATCH] fix(configuration): Extension Reference (Windows) --- src/server/configuration/Configuration.cpp | 6 +++--- src/server/configuration/Configuration.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/configuration/Configuration.cpp b/src/server/configuration/Configuration.cpp index bad8af12..16d1e188 100644 --- a/src/server/configuration/Configuration.cpp +++ b/src/server/configuration/Configuration.cpp @@ -458,7 +458,7 @@ bool Configuration::LoadConfiguration() RegisterConfiguration(wasEdited, coreConfigFile, "core", "core", "language", "en"); RegisterConfiguration(wasEdited, coreConfigFile, "core", "core", "use_player_language", true); - RegisterConfiguration(wasEdited,coreConfigFile, "core", "core", "menu.navigation_prefix", "➤"); + RegisterConfiguration(wasEdited, coreConfigFile, "core", "core", "menu.navigation_prefix", "➤"); RegisterConfiguration(wasEdited, coreConfigFile, "core", "core", "menu.sound.use.name", "Vote.Cast.Yes"); RegisterConfiguration(wasEdited, coreConfigFile, "core", "core", "menu.sound.use.volume", 0.75); @@ -636,7 +636,7 @@ void Configuration::ClearPluginConfig() EXT_API void* swiftly_GetConfigurationValue(const char* key) { - auto config = g_Config->FetchConfiguration(); - if(config.find(key) == config.end()) return nullptr; + auto& config = g_Config->FetchConfiguration(); + if (config.find(key) == config.end()) return nullptr; return (void*)&(config[key]); } \ No newline at end of file diff --git a/src/server/configuration/Configuration.h b/src/server/configuration/Configuration.h index d68844ad..a0beef42 100644 --- a/src/server/configuration/Configuration.h +++ b/src/server/configuration/Configuration.h @@ -26,7 +26,7 @@ class Configuration void LoadPluginConfigurations(); std::map FetchPluginConfiguration() { return this->pluginConfig; } - std::map FetchConfiguration() { return this->config; } + std::map& FetchConfiguration() { return this->config; } std::map FetchConfigArraySizes() { return this->configArraySizes; } void SetArraySize(std::string key, unsigned int size);