diff options
author | David Ostrovsky <david@ostrovsky.org> | 2015-08-01 08:00:05 +0200 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2015-08-01 08:02:28 +0200 |
commit | b593044e9c3d549d0edda43ba00cda67e089322a (patch) | |
tree | 7a98179736bb9bd44cd76e9892ce205ee0f29af3 /avmedia/source/vlc | |
parent | 512b782cf466a19ed77d818fa660e1a0dc74fc35 (diff) |
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
Diffstat (limited to 'avmedia/source/vlc')
-rw-r--r-- | avmedia/source/vlc/wrapper/EventHandler.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/EventManager.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/avmedia/source/vlc/wrapper/EventHandler.cxx b/avmedia/source/vlc/wrapper/EventHandler.cxx index 40e2e45c5628..3fa6bc27da64 100644 --- a/avmedia/source/vlc/wrapper/EventHandler.cxx +++ b/avmedia/source/vlc/wrapper/EventHandler.cxx @@ -35,7 +35,7 @@ void EventHandler::run() { mCallbackQueue.pop( callback ); - if ( callback.empty() ) + if ( callback ) return; callback(); diff --git a/avmedia/source/vlc/wrapper/EventManager.cxx b/avmedia/source/vlc/wrapper/EventManager.cxx index db18765b2e32..9759d587bccf 100644 --- a/avmedia/source/vlc/wrapper/EventManager.cxx +++ b/avmedia/source/vlc/wrapper/EventManager.cxx @@ -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 ); |