Skip to content

Commit

Permalink
Remove extra consistency check
Browse files Browse the repository at this point in the history
- In the deathrattle of Haunted Creeper, we summon two minions
  from the same iterator.
  • Loading branch information
Peter Shih committed Apr 6, 2016
1 parent 504bcef commit ae61946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/game-engine/board-objects/minions-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace GameEngine {

auto new_it = this->minions.insert(it.GetIterator(), std::move(new_minion));
#ifdef DEBUG
this->change_id++;
// this->change_id++; // change id is not changed since we're using a std::list
#endif

this->GetBoard().hook_manager.HookAfterMinionAdded(*new_it);
Expand Down Expand Up @@ -44,7 +44,7 @@ namespace GameEngine {

it.it = this->minions.erase(it.it);
#ifdef DEBUG
this->change_id++; // TODO: test only
this->change_id++; // TODO: Iterators point to exist minions are still valid; but I'd like to know when this happens
it.container_change_id = this->change_id;
#endif
}
Expand Down

0 comments on commit ae61946

Please sign in to comment.