summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/DummyEventLoop.cpp')
-rw-r--r--Swiften/EventLoop/DummyEventLoop.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/Swiften/EventLoop/DummyEventLoop.cpp b/Swiften/EventLoop/DummyEventLoop.cpp
index 45e9af7..4dfbac3 100644
--- a/Swiften/EventLoop/DummyEventLoop.cpp
+++ b/Swiften/EventLoop/DummyEventLoop.cpp
@@ -1,39 +1,37 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/EventLoop/DummyEventLoop.h>
-#include <iostream>
+#include <Swiften/Base/Log.h>
namespace Swift {
-DummyEventLoop::DummyEventLoop() : hasEvents_(false) {
+DummyEventLoop::DummyEventLoop() {
}
DummyEventLoop::~DummyEventLoop() {
- if (hasEvents()) {
- std::cerr << "DummyEventLoop: Unhandled events at destruction time" << std::endl;
- }
+ if (hasEvents()) {
+ SWIFT_LOG(warning) << "DummyEventLoop: Unhandled events at destruction time" << std::endl;
+ }
}
void DummyEventLoop::processEvents() {
- while(hasEvents()) {
- hasEvents_ = false;
- handleNextEvents();
- }
+ while(hasEvents()) {
+ hasEvents_ = false;
+ handleNextEvents();
+ }
}
bool DummyEventLoop::hasEvents() {
- boost::lock_guard<boost::mutex> lock(hasEventsMutex_);
- return hasEvents_;
+ return hasEvents_;
}
void DummyEventLoop::eventPosted() {
- boost::lock_guard<boost::mutex> lock(hasEventsMutex_);
- hasEvents_ = true;
+ hasEvents_ = true;
}
}