aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-04-04 23:57:56 +0000
committerMax Horn2006-04-04 23:57:56 +0000
commitd7dd5ad9d9f9e360ef686f51fe483d808026b22d (patch)
treedca5d4febfd43f8b0c3db4f31776c2bc0dbca4fc
parentbec09d30945c7dc143dc4ccd5e2fba1dcaccaac1 (diff)
downloadscummvm-rg350-d7dd5ad9d9f9e360ef686f51fe483d808026b22d.tar.gz
scummvm-rg350-d7dd5ad9d9f9e360ef686f51fe483d808026b22d.tar.bz2
scummvm-rg350-d7dd5ad9d9f9e360ef686f51fe483d808026b22d.zip
Re-fix sort by renaming min to minElem (avoid conflicts with certain system headers that #define min)
svn-id: r21618
-rw-r--r--common/func.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/func.h b/common/func.h
index e2cd20fdb3..3d50670e3e 100644
--- a/common/func.h
+++ b/common/func.h
@@ -73,14 +73,14 @@ void sort(T first, T last) {
// Simple selection sort
T i(first);
for (; i != last; ++i) {
- T min(i);
+ T minElem(i);
T j(i);
++j;
for (; j != last; ++j)
- if (*j < *min)
- min = j;
- if (min != i)
- SWAP(*min, *i);
+ if (*j < *minElem)
+ minElem = j;
+ if (minElem != i)
+ SWAP(*minElem, *i);
}
}