set default priority to avoid warning

when call 'scheduleUpdate' and 'unscheuleUpdate' several times in one frame, it will get warning "warning: you CANNOT change update priority in scheduled function"
This commit is contained in:
Eric Zhong 2014-11-18 22:05:56 +08:00
parent a1afa62000
commit 36e44dbaf9
1 changed files with 1 additions and 0 deletions

View File

@ -447,6 +447,7 @@ void Scheduler::appendIn(_listEntry **list, const ccSchedulerFunc& callback, voi
listElement->callback = callback; listElement->callback = callback;
listElement->target = target; listElement->target = target;
listElement->paused = paused; listElement->paused = paused;
listElement->priority = 0;
listElement->markedForDeletion = false; listElement->markedForDeletion = false;
DL_APPEND(*list, listElement); DL_APPEND(*list, listElement);