summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx/ArrayList.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 17:03:29 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 17:03:29 +0000
commitdce7ccf394831c73adccd72ed94321652362ca2e (patch)
treef6ea99f970fb7711a51967c488e3cc909301872d /FoundationEx/ArrayList.cpp
parent8c6737e70cb6ac4ae1cb0505ba8c81c32e867897 (diff)
downloadstarshatter-dce7ccf394831c73adccd72ed94321652362ca2e.zip
starshatter-dce7ccf394831c73adccd72ed94321652362ca2e.tar.gz
starshatter-dce7ccf394831c73adccd72ed94321652362ca2e.tar.bz2
Variable scoping fixes
Diffstat (limited to 'FoundationEx/ArrayList.cpp')
-rw-r--r--FoundationEx/ArrayList.cpp14
1 files changed, 8 insertions, 6 deletions
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;
}