Merge pull request #4470 from dumganhar/warrning-fix

A warning fix in CCBAnimationManager. Uses CallFuncN::create(std::function) instead.
This commit is contained in:
James Chen 2013-12-10 04:35:26 -08:00
commit 431eac78e5
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);
}
}