From 0ee1e1b965a9c112b26f497b65f991a58ccbd217 Mon Sep 17 00:00:00 2001 From: Roman C Date: Wed, 2 Apr 2008 17:39:42 +0000 Subject: [PATCH] Fixed warnings on MSVC. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4469 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/framework/macros.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/framework/macros.h b/lib/framework/macros.h index 58047fd6e..04c5eb9c7 100644 --- a/lib/framework/macros.h +++ b/lib/framework/macros.h @@ -40,9 +40,9 @@ /** * Returns the index of the lowest value in the array. */ -static inline int arrayMin(const int *array, const size_t n, int *index) +static inline int arrayMin(const int *array, const size_t n, size_t *index) { - int i, minIdx; + size_t i, minIdx; // Find the index of the minimum value for (i = minIdx = 0; i < n; i++) @@ -63,9 +63,9 @@ static inline int arrayMin(const int *array, const size_t n, int *index) return array[minIdx]; } -static inline float arrayMinF(const float *array, const size_t n, int *index) +static inline float arrayMinF(const float *array, const size_t n, size_t *index) { - int i, minIdx; + size_t i, minIdx; // Find the index of the minimum value for (i = minIdx = 0; i < n; i++) @@ -86,9 +86,9 @@ static inline float arrayMinF(const float *array, const size_t n, int *index) return array[minIdx]; } -static inline int arrayMax(const int *array, const size_t n, int *index) +static inline int arrayMax(const int *array, const size_t n, size_t *index) { - int i, maxIdx; + size_t i, maxIdx; // Find the index of the maximum value for (i = maxIdx = 0; i < n; i++) @@ -109,9 +109,9 @@ static inline int arrayMax(const int *array, const size_t n, int *index) return array[maxIdx]; } -static inline float arrayMaxF(const float *array, const size_t n, int *index) +static inline float arrayMaxF(const float *array, const size_t n, size_t *index) { - int i, maxIdx; + size_t i, maxIdx; // Find the index of the maximum value for (i = maxIdx = 0; i < n; i++)