diff options
Diffstat (limited to 'indra/newview/llsavedsettingsglue.cpp')
-rw-r--r-- | indra/newview/llsavedsettingsglue.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/indra/newview/llsavedsettingsglue.cpp b/indra/newview/llsavedsettingsglue.cpp index 073b51f80e..4736afa7ba 100644 --- a/indra/newview/llsavedsettingsglue.cpp +++ b/indra/newview/llsavedsettingsglue.cpp @@ -39,37 +39,27 @@ #include "llviewercontrol.h" -void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, void* data) +void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, const std::string& name) { - const char* name = (const char*)data; - LLSD value = ctrl->getValue(); - gSavedSettings.setBOOL(name, value.asBoolean()); + gSavedSettings.setBOOL(name, ctrl->getValue().asBoolean()); } -void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, void* data) +void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, const std::string& name) { - const char* name = (const char*)data; - LLSD value = ctrl->getValue(); - gSavedSettings.setS32(name, value.asInteger()); + gSavedSettings.setS32(name, ctrl->getValue().asInteger()); } -void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, void* data) +void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, const std::string& name) { - const char* name = (const char*)data; - LLSD value = ctrl->getValue(); - gSavedSettings.setF32(name, (F32)value.asReal()); + gSavedSettings.setF32(name, (F32)ctrl->getValue().asReal()); } -void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, void* data) +void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, const std::string& name) { - const char* name = (const char*)data; - LLSD value = ctrl->getValue(); - gSavedSettings.setU32(name, (U32)value.asInteger()); + gSavedSettings.setU32(name, (U32)ctrl->getValue().asInteger()); } -void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data) +void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, const std::string& name) { - const char* name = (const char*)data; - LLSD value = ctrl->getValue(); - gSavedSettings.setString(name, value.asString()); + gSavedSettings.setString(name, ctrl->getValue().asString()); } |