slideshow: dumb this down to hopefully make non-GCC compilers happy
Change-Id: If08a4f0c177abf38a381dcb9ba73a09265b2bcb5
This commit is contained in:
@@ -98,6 +98,23 @@ void AnimationAudioNode::activate_st()
|
|||||||
// TODO(F2): generate deactivation event, when sound
|
// TODO(F2): generate deactivation event, when sound
|
||||||
// is over
|
// 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*/ )
|
void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ )
|
||||||
{
|
{
|
||||||
AnimationEventHandlerSharedPtr aHandler(
|
AnimationEventHandlerSharedPtr aHandler(
|
||||||
@@ -115,9 +132,7 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ )
|
|||||||
|
|
||||||
// notify _after_ state change:
|
// notify _after_ state change:
|
||||||
getContext().mrEventQueue.addEvent(
|
getContext().mrEventQueue.addEvent(
|
||||||
makeEvent( std::bind( &EventMultiplexer::notifyAudioStopped,
|
makeEvent( NotifyAudioStopped(getContext().mrEventMultiplexer, getSelf()),
|
||||||
std::ref(getContext().mrEventMultiplexer),
|
|
||||||
getSelf() ),
|
|
||||||
"AnimationAudioNode::notifyAudioStopped") );
|
"AnimationAudioNode::notifyAudioStopped") );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user