diff --git a/src/Battling/Flow/ChoiceQueue.cpp b/src/Battling/Flow/ChoiceQueue.cpp index 8f7b333..2024d48 100644 --- a/src/Battling/Flow/ChoiceQueue.cpp +++ b/src/Battling/Flow/ChoiceQueue.cpp @@ -2,7 +2,7 @@ bool CreatureLib::Battling::ChoiceQueue::MoveCreatureChoiceNext(CreatureLib::Battling::Creature* creature) { // Find which index the creature choice is at. - size_t choiceIndex = -1; + size_t choiceIndex = SIZE_MAX; for (size_t index = _current; index < _queue.size(); index++) { if (_queue.at(index)->GetUser() == creature) { // If the creature choice is already next up, return. @@ -12,7 +12,7 @@ bool CreatureLib::Battling::ChoiceQueue::MoveCreatureChoiceNext(CreatureLib::Bat } } // If the creature has no choice anymore, return. - if (choiceIndex == -1) + if (choiceIndex == SIZE_MAX) return false; // Save the pointer to the creature choice.