From 70e82dfe12c22fdb271d60a37456eb307b4a41c0 Mon Sep 17 00:00:00 2001 From: Dav999-v Date: Sun, 11 Oct 2020 22:56:17 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20"name=20lookup=20of=20=E2=80=98i=E2=80=99?= =?UTF-8?q?=20changed"=20warning=20in=20editor.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I got this warning during compilation because there were two nested for loops both defining i. Better to have different names to make sure some compilers won't overwrite the outer variable with the inner one. --- desktop_version/src/editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index cda9edc6..f3e1db8e 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -2688,7 +2688,7 @@ void editorrender() drawRect = graphics.tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); drawRect.x += 8; @@ -2721,7 +2721,7 @@ void editorrender() drawRect = graphics.tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); drawRect.x += 8; @@ -2749,7 +2749,7 @@ void editorrender() drawRect = graphics.tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; - for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); drawRect.x += 8;