mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed use of code referencing temporary objects.
This commit is contained in:
@@ -253,7 +253,4 @@ namespace loot {
|
||||
const YAML::Node& LootState::GetSettings() const {
|
||||
return _settings;
|
||||
}
|
||||
const YAML::Node& LootState::GetSetting(const std::string& setting) const {
|
||||
return _settings[setting];
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,6 @@ namespace loot {
|
||||
Game& CurrentGame();
|
||||
|
||||
const YAML::Node& GetSettings() const;
|
||||
const YAML::Node& GetSetting(const std::string& setting) const;
|
||||
|
||||
private:
|
||||
YAML::Node _settings;
|
||||
|
||||
+2
-2
@@ -204,8 +204,8 @@ namespace loot {
|
||||
|
||||
//Set language.
|
||||
unsigned int language;
|
||||
if (g_app_state.GetSetting("language"))
|
||||
language = Language(g_app_state.GetSetting("language").as<string>()).Code();
|
||||
if (g_app_state.GetSettings()["language"])
|
||||
language = Language(g_app_state.GetSettings()["language"].as<string>()).Code();
|
||||
else
|
||||
language = Language::any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user