[Libreoffice-commits] core.git: slideshow/source
Michael Stahl
mstahl at redhat.com
Mon Aug 3 08:52:24 PDT 2015
slideshow/source/engine/animationnodes/animationaudionode.cxx | 21 ++++++++--
1 file changed, 18 insertions(+), 3 deletions(-)
New commits:
commit e8f8c32581c9bebec2537095f1e9320e42bb7acb
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Aug 3 17:45:42 2015 +0200
slideshow: dumb this down to hopefully make non-GCC compilers happy
Change-Id: If08a4f0c177abf38a381dcb9ba73a09265b2bcb5
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx
index c44561a..a037b42 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") );
}
More information about the Libreoffice-commits
mailing list