mirror of https://github.com/axmolengine/axmol.git
A warning fix in CCBAnimationManager. Uses CallFuncN::create(std::function) instead.
This commit is contained in:
parent
1db469fa3d
commit
f10bd853c0
|
@ -683,8 +683,14 @@ Object* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* chann
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// XXX: how to fix this warning?
|
auto savedTarget = std::make_shared<Vector<Object*>>();
|
||||||
CallFuncN *callback = CallFuncN::create(target, selCallFunc);
|
savedTarget->pushBack(target);
|
||||||
|
|
||||||
|
auto callback = CallFuncN::create([savedTarget, selCallFunc](Node* sender){
|
||||||
|
auto t = savedTarget->at(0);
|
||||||
|
(t->*selCallFunc)(sender);
|
||||||
|
});
|
||||||
|
|
||||||
actions.pushBack(callback);
|
actions.pushBack(callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue