[Libreoffice-commits] core.git: avmedia/source
David Ostrovsky
david at ostrovsky.org
Fri Jul 31 23:04:07 PDT 2015
avmedia/source/vlc/wrapper/EventHandler.cxx | 2 +-
avmedia/source/vlc/wrapper/EventManager.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit b593044e9c3d549d0edda43ba00cda67e089322a
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Aug 1 08:00:05 2015 +0200
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
diff --git a/avmedia/source/vlc/wrapper/EventHandler.cxx b/avmedia/source/vlc/wrapper/EventHandler.cxx
index 40e2e45..3fa6bc2 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 db18765..9759d58 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 );
More information about the Libreoffice-commits
mailing list