From c7158f3b4de6ef438630020d7fe49a148c6773d2 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 26 Jul 2011 20:14:13 +0300 Subject: STORM-1405 WIP Eliminated redundant getChild() calls. --- indra/newview/llpanelvoicedevicesettings.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') 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("voice_input_device")->setCommitCallback( + mCtrlInputDevices = getChild("voice_input_device"); + mCtrlOutputDevices = getChild("voice_output_device"); + + mCtrlInputDevices->setCommitCallback( boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this)); - getChild("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("voice_input_device"); - mCtrlOutputDevices = getChild("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("voice_input_device")->getValue().asString()); + mCtrlInputDevices->getValue().asString()); } } @@ -306,6 +306,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice() if(LLVoiceClient::getInstance()) { LLVoiceClient::getInstance()->setRenderDevice( - getChild("voice_output_device")->getValue().asString()); + mCtrlInputDevices->getValue().asString()); } } -- cgit v1.2.3