summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-07-26 20:14:13 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-07-26 20:14:13 +0300
commitc7158f3b4de6ef438630020d7fe49a148c6773d2 (patch)
tree92f0d2ed689ffb763780395618dcb4a3a6395b96
parent825fc273ee5167052d811dc058b1834c86e005da (diff)
STORM-1405 WIP Eliminated redundant getChild() calls.
-rw-r--r--indra/newview/llpanelvoicedevicesettings.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index 4a80bbbe5e..94d65c5db2 100644
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -68,9 +68,12 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
// set mic volume tuning slider based on last mic volume setting
volume_slider->setValue(mMicVolume);
- getChild<LLComboBox>("voice_input_device")->setCommitCallback(
+ mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
+ mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
+
+ mCtrlInputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
- getChild<LLComboBox>("voice_output_device")->setCommitCallback(
+ mCtrlOutputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
return TRUE;
@@ -188,9 +191,6 @@ void LLPanelVoiceDeviceSettings::refresh()
LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume);
// Fill in popup menus
- mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
- mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
-
bool device_settings_available = LLVoiceClient::getInstance()->deviceSettingsAvailable();
if (mCtrlInputDevices)
@@ -297,7 +297,7 @@ void LLPanelVoiceDeviceSettings::onCommitInputDevice()
if(LLVoiceClient::getInstance())
{
LLVoiceClient::getInstance()->setCaptureDevice(
- getChild<LLComboBox>("voice_input_device")->getValue().asString());
+ mCtrlInputDevices->getValue().asString());
}
}
@@ -306,6 +306,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice()
if(LLVoiceClient::getInstance())
{
LLVoiceClient::getInstance()->setRenderDevice(
- getChild<LLComboBox>("voice_output_device")->getValue().asString());
+ mCtrlInputDevices->getValue().asString());
}
}