fixed GMST string handling in GUI

pull/37/head
Marc Zinnschlag 12 years ago
parent 35d7b5e5b0
commit d1c4559abe

@ -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;

@ -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_;

@ -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);

Loading…
Cancel
Save