diff options
Diffstat (limited to 'Swiften/EventLoop')
-rw-r--r-- | Swiften/EventLoop/DummyEventLoop.h | 2 | ||||
-rw-r--r-- | Swiften/EventLoop/SimpleEventLoop.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/EventLoop/DummyEventLoop.h b/Swiften/EventLoop/DummyEventLoop.h index f814ed9..4c01c16 100644 --- a/Swiften/EventLoop/DummyEventLoop.h +++ b/Swiften/EventLoop/DummyEventLoop.h @@ -24,7 +24,7 @@ namespace Swift { } bool hasEvents() { - return events_.size() > 0; + return !events_.empty(); } virtual void post(const Event& event) { diff --git a/Swiften/EventLoop/SimpleEventLoop.cpp b/Swiften/EventLoop/SimpleEventLoop.cpp index 74fea01..63b8ba5 100644 --- a/Swiften/EventLoop/SimpleEventLoop.cpp +++ b/Swiften/EventLoop/SimpleEventLoop.cpp @@ -30,7 +30,7 @@ void SimpleEventLoop::doRun(bool breakAfterEvents) { std::vector<Event> events; { boost::unique_lock<boost::mutex> lock(eventsMutex_); - while (events_.size() == 0) { + while (events_.empty()) { eventsAvailable_.wait(lock); } events.swap(events_); |