summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/EventLoop.cpp')
-rw-r--r--Swiften/EventLoop/EventLoop.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/EventLoop/EventLoop.cpp b/Swiften/EventLoop/EventLoop.cpp
index cd4e461..014b81f 100644
--- a/Swiften/EventLoop/EventLoop.cpp
+++ b/Swiften/EventLoop/EventLoop.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -13,7 +13,11 @@
#include <boost/thread/locks.hpp>
#include <Swiften/Base/Log.h>
+#include <boost/thread/locks.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/lambda/bind.hpp>
+namespace lambda = boost::lambda;
namespace Swift {
@@ -84,7 +88,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);
}
}