diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-23 16:01:45 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2012-12-23 16:48:15 (GMT) |
commit | 5ccbd7fc3de7afed6c06deb93be3967a7eb5fac2 (patch) | |
tree | d57334bf18662d6753a2cb14bff3b192ff3e7a76 /Swiften/EventLoop/EventLoop.cpp | |
parent | fe5b5e25eadbfe9f8bdaa152b987273ab77d4711 (diff) | |
download | swift-5ccbd7fc3de7afed6c06deb93be3967a7eb5fac2.zip swift-5ccbd7fc3de7afed6c06deb93be3967a7eb5fac2.tar.bz2 |
Replace functors and for loops by boost::lambdas.
Change-Id: I6d2364dc85464f238d95978793f35953a2947799
Diffstat (limited to 'Swiften/EventLoop/EventLoop.cpp')
-rw-r--r-- | Swiften/EventLoop/EventLoop.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/EventLoop/EventLoop.cpp b/Swiften/EventLoop/EventLoop.cpp index afb6858..0f78d96 100644 --- a/Swiften/EventLoop/EventLoop.cpp +++ b/Swiften/EventLoop/EventLoop.cpp @@ -12,7 +12,10 @@ #include <cassert> #include <Swiften/Base/Log.h> +#include <boost/lambda/lambda.hpp> +#include <boost/lambda/bind.hpp> +namespace lambda = boost::lambda; namespace Swift { @@ -83,7 +86,7 @@ void EventLoop::postEvent(boost::function<void ()> callback, boost::shared_ptr<E void EventLoop::removeEventsFromOwner(boost::shared_ptr<EventOwner> owner) { boost::lock_guard<boost::mutex> lock(eventsMutex_); - events_.remove_if(HasOwner(owner)); + events_.remove_if(lambda::bind(&Event::owner, lambda::_1) == owner); } } |