Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20b4214

Browse files
cppcoopermyk002
authored andcommitted
On second thought, not redundant
1 parent 6ace4b2 commit 20b4214

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/diggingInvaders/diggingInvaders.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ void findAndAssignInvasionJob(color_ostream& out, void* tickTime) {
373373
return;
374374
}
375375

376-
//this line is actually redundant now: EventManager::unregister(EventManager::EventType::TICK, findJobTickHandler, plugin_self);
376+
//we're going to unregister just in case this function has been called 20 times or something.
377+
EventManager::unregister(EventManager::EventType::TICK, findJobTickHandler, plugin_self);
377378
EventManager::registerTick(findJobTickHandler, 1, plugin_self);
378379

379380
if ( fringe.empty() ) {

0 commit comments

Comments
 (0)