Scope all for loops

This caused 7 of the loops to be rewriteen using range by clang-tidy
This commit is contained in:
Anders Jenbo 2021-07-07 18:10:36 +02:00
commit 903d4bd2e1
27 changed files with 147 additions and 233 deletions

View file

@ -84,11 +84,8 @@ const char *const QuestLevelNames[] = {
int ObjIndex(int x, int y)
{
int i;
int oi;
for (i = 0; i < ActiveObjectCount; i++) {
oi = ActiveObjects[i];
for (int i = 0; i < ActiveObjectCount; i++) {
int oi = ActiveObjects[i];
if (Objects[oi].position.x == x && Objects[oi].position.y == y)
return oi;
}