From e12807194911095fcf2bdb25b9ee8cdbce6fb6d4 Mon Sep 17 00:00:00 2001 From: Chris Laurel Date: Sat, 17 Mar 2001 00:21:17 +0000 Subject: [PATCH] Moved compareIgnoringCase to util.cpp --- src/filetype.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/filetype.cpp b/src/filetype.cpp index a3c5da07f..5a969835f 100644 --- a/src/filetype.cpp +++ b/src/filetype.cpp @@ -8,6 +8,7 @@ // of the License, or (at your option) any later version. #include +#include "util.h" #include "filetype.h" using namespace std; @@ -22,23 +23,6 @@ static const string CelestiaTextureExt(".ctx"); static const string CelestiaMeshExt(".cms"); -static int compareIgnoringCase(const string& s1, const string& s2) -{ - string::const_iterator i1 = s1.begin(); - string::const_iterator i2 = s2.begin(); - - while (i1 != s1.end() && i2 != s2.end()) - { - if (toupper(*i1) != toupper(*i2)) - return (toupper(*i1) < toupper(*i2)) ? -1 : 1; - ++i1; - ++i2; - } - - return s2.size() - s1.size(); -} - - ContentType DetermineFileType(const string& filename) { int extPos = filename.length() - 4;