From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/llsavedsettingsglue.cpp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'indra/newview/llsavedsettingsglue.cpp') 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()); } -- cgit v1.3