summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewercontrol.h')
-rw-r--r--indra/newview/llviewercontrol.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index d0dc80cb9a..c4003111d3 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -84,7 +84,7 @@ class LLCachedControl
{
T mCachedValue;
LLPointer<LLControlVariable> mControl;
- boost::signals::connection mConnection;
+ boost::signals2::scoped_connection mConnection;
public:
LLCachedControl(const std::string& name,
@@ -109,17 +109,13 @@ public:
}
// Add a listener to the controls signal...
- mControl->getSignal()->connect(
+ mConnection = mControl->getSignal()->connect(
boost::bind(&LLCachedControl<T>::handleValueChange, this, _1)
);
}
~LLCachedControl()
{
- if(mConnection.connected())
- {
- mConnection.disconnect();
- }
}
LLCachedControl& operator =(const T& newvalue)