summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-15 07:42:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-15 07:42:18 (GMT)
commit0930cd940963be0edfe7c80b4925babca0e01443 (patch)
treeb2a57761bfdf1a14ea75ea1a9871c70d85ff8024 /Swiften/EventLoop/EventLoop.cpp
parentd2625df30861a4caa984031a6990d19dfebc3367 (diff)
downloadswift-0930cd940963be0edfe7c80b4925babca0e01443.zip
swift-0930cd940963be0edfe7c80b4925babca0e01443.tar.bz2
Use shared_ptr for EventLoop owners.
Diffstat (limited to 'Swiften/EventLoop/EventLoop.cpp')
-rw-r--r--Swiften/EventLoop/EventLoop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/EventLoop/EventLoop.cpp b/Swiften/EventLoop/EventLoop.cpp
index cec149c..3c3c356 100644
--- a/Swiften/EventLoop/EventLoop.cpp
+++ b/Swiften/EventLoop/EventLoop.cpp
@@ -30,7 +30,7 @@ void EventLoop::handleEvent(const Event& event) {
}
}
-void EventLoop::postEvent(boost::function<void ()> callback, void* owner) {
+void EventLoop::postEvent(boost::function<void ()> callback, boost::shared_ptr<EventOwner> owner) {
Event event(owner, callback);
{
boost::lock_guard<boost::mutex> lock(eventsMutex_);
@@ -41,7 +41,7 @@ void EventLoop::postEvent(boost::function<void ()> callback, void* owner) {
post(event);
}
-void EventLoop::removeEventsFromOwner(void* owner) {
+void EventLoop::removeEventsFromOwner(boost::shared_ptr<EventOwner> owner) {
boost::lock_guard<boost::mutex> lock(eventsMutex_);
events_.remove_if(HasOwner(owner));
}