diff --git a/apps/openmw/mwbase/windowmanager.hpp b/apps/openmw/mwbase/windowmanager.hpp index 8ea9e5cefe..d1daa101db 100644 --- a/apps/openmw/mwbase/windowmanager.hpp +++ b/apps/openmw/mwbase/windowmanager.hpp @@ -213,7 +213,7 @@ namespace MWBase * @param id Identifier for the GMST setting, e.g. "aName" * @param default Default value if the GMST setting cannot be used. */ - virtual const std::string &getGameSettingString(const std::string &id, const std::string &default_) = 0; + virtual std::string getGameSettingString(const std::string &id, const std::string &default_) = 0; virtual void processChangedSettings(const Settings::CategorySettingVector& changed) = 0; diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 87a2bc4401..2b592e2ca2 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -520,9 +520,9 @@ int WindowManager::readPressedButton () return mMessageBoxManager->readPressedButton(); } -const std::string &WindowManager::getGameSettingString(const std::string &id, const std::string &default_) +std::string WindowManager::getGameSettingString(const std::string &id, const std::string &default_) { - const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.find(id); + const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.search(id); if (setting && setting->mType == ESM::VT_String) return setting->getString(); return default_; diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index e30e110d35..f67559ccdd 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -196,7 +196,7 @@ namespace MWGui * @param id Identifier for the GMST setting, e.g. "aName" * @param default Default value if the GMST setting cannot be used. */ - virtual const std::string &getGameSettingString(const std::string &id, const std::string &default_); + virtual std::string getGameSettingString(const std::string &id, const std::string &default_); virtual void processChangedSettings(const Settings::CategorySettingVector& changed);