summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-12-19 12:11:13 -0500
committerOz Linden <oz@lindenlab.com>2013-12-19 12:11:13 -0500
commit03e84beac09de0659c0453c137deae1d3715667b (patch)
tree390d3aa79165ae277d1e401d5b0991e7716a6537 /indra
parente10c32b30aca20258c8356fdab33058d64781198 (diff)
parent1886428638c2cb1e82db9f97ad311c2a506677a6 (diff)
merge addition of LLAgent::removeRegionChangeCallback
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llagent.cpp6
-rwxr-xr-xindra/newview/llagent.h7
2 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6ee8f26b9f..14a2508697 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -976,11 +976,15 @@ LLHost LLAgent::getRegionHost() const
}
}
-boost::signals2::connection LLAgent::addRegionChangedCallback(region_changed_callback_t cb)
+boost::signals2::connection LLAgent::addRegionChangedCallback(const region_changed_signal_t::slot_type& cb)
{
return mRegionChangedSignal.connect(cb);
}
+void LLAgent::removeRegionChangedCallback(boost::signals2::connection callback)
+{
+ mRegionChangedSignal.disconnect(callback);
+}
//-----------------------------------------------------------------------------
// inPrelude()
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0662be897a..0766407494 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -271,12 +271,13 @@ private:
* // you may or may not want to remove that callback
* }
*/
- typedef boost::function<void()> region_changed_callback_t;
- boost::signals2::connection addRegionChangedCallback(region_changed_callback_t);
+ typedef boost::signals2::signal<void()> region_changed_signal_t;
+
+ boost::signals2::connection addRegionChangedCallback(const region_changed_signal_t::slot_type& cb);
+ void removeRegionChangedCallback(boost::signals2::connection callback);
private:
LLViewerRegion *mRegionp;
- typedef boost::signals2::signal<void()> region_changed_signal_t;
region_changed_signal_t mRegionChangedSignal;
//--------------------------------------------------------------------