diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-03 17:45:42 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-08-03 17:45:42 +0200 |
commit | e8f8c32581c9bebec2537095f1e9320e42bb7acb (patch) | |
tree | fab12adbffa91eb8bc90af28eeaa5e1003bfcc78 /slideshow | |
parent | c05bf5e494faad57400f9c04079cb99ff6b805dd (diff) |
slideshow: dumb this down to hopefully make non-GCC compilers happy
Change-Id: If08a4f0c177abf38a381dcb9ba73a09265b2bcb5
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/animationnodes/animationaudionode.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx index c44561ae6798..a037b4269f0d 100644 --- a/slideshow/source/engine/animationnodes/animationaudionode.cxx +++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx @@ -98,6 +98,23 @@ void AnimationAudioNode::activate_st() // TODO(F2): generate deactivation event, when sound // is over +// libc++ and MSVC std::bind doesn't cut it here, and it's not possible to use +// a lambda because the preprocessor thinks that comma in capture list +// separates macro parameters +struct NotifyAudioStopped +{ + EventMultiplexer & m_rEventMultiplexer; + ::boost::shared_ptr<BaseNode> m_pSelf; + NotifyAudioStopped(EventMultiplexer & rEventMultiplexer, + ::boost::shared_ptr<BaseNode> const& pSelf) + : m_rEventMultiplexer(rEventMultiplexer), m_pSelf(pSelf) { } + + void operator()() + { + m_rEventMultiplexer.notifyAudioStopped(m_pSelf); + } +}; + void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ ) { AnimationEventHandlerSharedPtr aHandler( @@ -115,9 +132,7 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ ) // notify _after_ state change: getContext().mrEventQueue.addEvent( - makeEvent( std::bind( &EventMultiplexer::notifyAudioStopped, - std::ref(getContext().mrEventMultiplexer), - getSelf() ), + makeEvent( NotifyAudioStopped(getContext().mrEventMultiplexer, getSelf()), "AnimationAudioNode::notifyAudioStopped") ); } |