Kaydet (Commit) b593044e authored tarafından David Ostrovsky's avatar David Ostrovsky

std::function doesn't have empty() method

The correct way to perform the check for it in C++11 is to call
std::function::operator bool.

http://en.cppreference.com/w/cpp/utility/functional/function/operator_bool

Change-Id: I4df8daaa758b4d5b382e340b90c4588a83ee11ce
üst 512b782c
......@@ -35,7 +35,7 @@ void EventHandler::run()
{
mCallbackQueue.pop( callback );
if ( callback.empty() )
if ( callback )
return;
callback();
......
......@@ -66,7 +66,7 @@ EventManager::EventManager( Player& player, EventHandler& eh )
void EventManager::registerSignal( int signal, const Callback& callback )
{
if ( callback.empty() )
if ( callback )
libvlc_event_detach( mManager, signal, Handler, this );
else
libvlc_event_attach( mManager, signal, Handler, this );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment