From dce7ccf394831c73adccd72ed94321652362ca2e Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 17:03:29 +0000 Subject: Variable scoping fixes --- FoundationEx/ArrayList.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'FoundationEx/ArrayList.cpp') diff --git a/FoundationEx/ArrayList.cpp b/FoundationEx/ArrayList.cpp index 86fcbc3..52c6eb9 100644 --- a/FoundationEx/ArrayList.cpp +++ b/FoundationEx/ArrayList.cpp @@ -102,8 +102,8 @@ void ArrayList::resize(int newsize) #else DWORD* v = new DWORD[extent]; #endif - - for (int i = 0; i < items; i++) + int i; + for (i = 0; i < items; i++) v[i] = array[i]; for (; i < extent; i++) @@ -157,7 +157,8 @@ void ArrayList::insert(DWORD item, int index) void ArrayList::insertSort(DWORD item) { - for (int i = 0; i < items; i++) { + int i; + for (i = 0; i < items; i++) { if (item < array[i]) break; } @@ -456,8 +457,8 @@ void FloatList::resize(int newsize) #else float* v = new float[extent]; #endif - - for (int i = 0; i < items; i++) + int i; + for (i = 0; i < items; i++) v[i] = array[i]; for (; i < extent; i++) @@ -511,7 +512,8 @@ void FloatList::insert(float item, int index) void FloatList::insertSort(float item) { - for (int i = 0; i < items; i++) { + int i; + for (i = 0; i < items; i++) { if (item < array[i]) break; } -- cgit v1.1