From 8ab6ad64f9a570a5529f77dd2e99175bf46995d0 Mon Sep 17 00:00:00 2001 From: Vasily Galkin Date: Wed, 6 May 2020 11:43:47 +0300 Subject: [PATCH] Remove unused IEventQueue::isEmpty() method to simplify code understanding Current code base don't use IEventQueue::isEmpty() method. Remove it to simplify IEventQueue API and to remove confusion with IEventQueueBuffer with same name. The IEventQueueBuffer::isEmpty() and all its implementations kept unchanged --- src/lib/base/EventQueue.cpp | 6 ------ src/lib/base/EventQueue.h | 1 - src/lib/base/IEventQueue.h | 7 ------- 3 files changed, 14 deletions(-) diff --git a/src/lib/base/EventQueue.cpp b/src/lib/base/EventQueue.cpp index fe8cff5d14..e71ec247e0 100644 --- a/src/lib/base/EventQueue.cpp +++ b/src/lib/base/EventQueue.cpp @@ -436,12 +436,6 @@ EventQueue::removeHandlers(void* target) } } -bool -EventQueue::isEmpty() const -{ - return (m_buffer->isEmpty() && getNextTimerTimeout() != 0.0); -} - IEventJob* EventQueue::getHandler(Event::Type type, void* target) const { diff --git a/src/lib/base/EventQueue.h b/src/lib/base/EventQueue.h index 0a2179beb1..b20d493ba6 100644 --- a/src/lib/base/EventQueue.h +++ b/src/lib/base/EventQueue.h @@ -58,7 +58,6 @@ class EventQueue : public IEventQueue { virtual void removeHandlers(void* target); virtual Event::Type registerTypeOnce(Event::Type& type, const char* name); - virtual bool isEmpty() const; virtual IEventJob* getHandler(Event::Type type, void* target) const; virtual const char* getTypeName(Event::Type type); virtual Event::Type diff --git a/src/lib/base/IEventQueue.h b/src/lib/base/IEventQueue.h index cd4f0b3cad..70399d36a0 100644 --- a/src/lib/base/IEventQueue.h +++ b/src/lib/base/IEventQueue.h @@ -189,13 +189,6 @@ class IEventQueue : public IInterface { //! @name accessors //@{ - //! Test if queue is empty - /*! - Returns true iff the queue has no events in it, including timer - events. - */ - virtual bool isEmpty() const = 0; - //! Get an event handler /*! Finds and returns the event handler for the \p type, \p target pair