Fix some cppcheck warnings (mostly style and postfix vs prefix iteration)

This commit is contained in:
Tobias Loose
2013-11-17 19:36:24 +01:00
parent 3ca2f1c1ed
commit 7a48c5e087
6 changed files with 26 additions and 45 deletions

View File

@@ -97,7 +97,7 @@ int AIAction::clickMultiAct(vector<Targetable*>& actionTargets)
ite = actionTargets.erase(ite);
continue;
}
ite++;
++ite;
}
//shuffle to make it less predictable, otherwise ai will always seem to target from right to left. making it very obvious.
@@ -167,7 +167,7 @@ int AIPlayer::clickMultiTarget(TargetChooser * tc, vector<Targetable*>& potentia
ite = potentialTargets.erase(ite);
continue;
}
ite++;
++ite;
}
randomGenerator.random_shuffle(potentialTargets.begin(), potentialTargets.end());