-
-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: Game::checkCreatures (#3020)
The loop by iterator has been replaced by erase_if, as it is visually cleaner and more intuitive. In terms of performance, there was not much gain, as both use object reallocation, perhaps a slight improvement, as erase_if uses std::move to reallocate the last object. A dead code that is never called has also been removed, as this code is already called by Creature::changeHealth on line 892
- Loading branch information
Showing
2 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters