std::function::operator bool returns true if it contains a valid target
Change-Id: I8e65c0243094468dca06a1b30b5244bef931f8ac
This commit is contained in:
@@ -35,7 +35,7 @@ void EventHandler::run()
|
||||
{
|
||||
mCallbackQueue.pop( callback );
|
||||
|
||||
if ( callback )
|
||||
if ( !callback )
|
||||
return;
|
||||
|
||||
callback();
|
||||
|
@@ -66,7 +66,7 @@ EventManager::EventManager( Player& player, EventHandler& eh )
|
||||
|
||||
void EventManager::registerSignal( int signal, const Callback& callback )
|
||||
{
|
||||
if ( callback )
|
||||
if ( !callback )
|
||||
libvlc_event_detach( mManager, signal, Handler, this );
|
||||
else
|
||||
libvlc_event_attach( mManager, signal, Handler, this );
|
||||
|
Reference in New Issue
Block a user