From 875535b1c60533057609664679cfaa2a11030931 Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Wed, 5 Sep 2012 22:20:38 +0100 Subject: [PATCH] [Fix] Initializing variables in loops is bad ya? --- src/BattleSys/Slot.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BattleSys/Slot.cpp b/src/BattleSys/Slot.cpp index ae3c382..ab0f999 100644 --- a/src/BattleSys/Slot.cpp +++ b/src/BattleSys/Slot.cpp @@ -32,9 +32,8 @@ void Slot::Render(void) { } void Slot::Render(float x, float y) { + int offset = 52; for(int i = 0; i < _index; i++) { - int offset = 52; - if(i != _index) { x += offset; _slotArray[_index]->Render(x, y);