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