Pre instead of post increment a variable.

Issue found by cppcheck.
This commit is contained in:
Mark de Wever 2010-01-01 17:12:23 +00:00
parent 5a3133c818
commit 376fab4668

View file

@ -1058,7 +1058,7 @@ bool play_controller::in_context_menu(hotkey::HOTKEY_COMMAND command) const
// last_hex_ is set by mouse_events::mouse_motion
// Enable recruit/recall on castle/keep tiles
for(unit_map::const_iterator leader = units_.begin();
leader != units_.end();leader++) {
leader != units_.end();++leader) {
if (leader->second.can_recruit() &&
static_cast<int>(leader->second.side()) == player_number_ &&
can_recruit_on(map_, leader->first, mouse_handler_.get_last_hex()))