slideshow: dumb this down to hopefully make non-GCC compilers happy

Change-Id: If08a4f0c177abf38a381dcb9ba73a09265b2bcb5
This commit is contained in:
Michael Stahl
2015-08-03 17:45:42 +02:00
parent c05bf5e494
commit e8f8c32581

View File

@@ -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") );
}