summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx
diff options
context:
space:
mode:
Diffstat (limited to 'FoundationEx')
-rw-r--r--FoundationEx/ArrayList.cpp14
-rw-r--r--FoundationEx/List.inl21
-rw-r--r--FoundationEx/Text.h4
3 files changed, 21 insertions, 18 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;
}
diff --git a/FoundationEx/List.inl b/FoundationEx/List.inl
index 841e690..d868e65 100644
--- a/FoundationEx/List.inl
+++ b/FoundationEx/List.inl
@@ -130,8 +130,8 @@ void List<T>::resize(int newsize)
#else
T** v = new PTR[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++)
@@ -187,14 +187,15 @@ void List<T>::insert(const T* item, int index)
template <class T>
void List<T>::insertSort(const T* item)
{
- if (item) {
- for (int i = 0; i < items; i++) {
- if (*item < *array[i])
- break;
- }
-
- insert(item, i);
- }
+ if (item) {
+ int i;
+ for (i = 0; i < items; i++) {
+ if (*item < *array[i])
+ break;
+ }
+
+ insert(item, i);
+ }
}
// +-------------------------------------------------------------------+
diff --git a/FoundationEx/Text.h b/FoundationEx/Text.h
index cb037ef..3abacc3 100644
--- a/FoundationEx/Text.h
+++ b/FoundationEx/Text.h
@@ -136,7 +136,7 @@ inline int Text::compare(const char* s) const
if (rep->sensitive)
return strcmp(sym, s);
else
- return stricmp(sym, s);
+ return _stricmp(sym, s);
}
inline int Text::compare(const Text& s) const
@@ -144,7 +144,7 @@ inline int Text::compare(const Text& s) const
if (rep->sensitive && s.rep->sensitive)
return strcmp(sym, s.sym);
else
- return stricmp(sym, s.sym);
+ return _stricmp(sym, s.sym);
}
// +-------------------------------------------------------------------+