A warning fix in CCBAnimationManager. Uses CallFuncN::create(std::function) instead.

This commit is contained in:
James Chen 2013-12-10 20:33:21 +08:00
parent 1db469fa3d
commit f10bd853c0
1 changed files with 8 additions and 2 deletions

View File

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