Skip to content

Commit

Permalink
fix(configuration): Extension Reference (Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
skuzzis committed Jan 5, 2025
1 parent 1ff2fc6 commit e603fe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/server/configuration/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
}
2 changes: 1 addition & 1 deletion src/server/configuration/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Configuration
void LoadPluginConfigurations();

std::map<std::string, std::any> FetchPluginConfiguration() { return this->pluginConfig; }
std::map<std::string, std::any> FetchConfiguration() { return this->config; }
std::map<std::string, std::any>& FetchConfiguration() { return this->config; }
std::map<std::string, unsigned int> FetchConfigArraySizes() { return this->configArraySizes; }

void SetArraySize(std::string key, unsigned int size);
Expand Down

0 comments on commit e603fe8

Please sign in to comment.