Moved compareIgnoringCase to util.cpp

ver1_5_1
Chris Laurel 2001-03-17 00:21:17 +00:00
parent b99d3f44e9
commit e128071949
1 changed files with 1 additions and 17 deletions

View File

@ -8,6 +8,7 @@
// of the License, or (at your option) any later version.
#include <cctype>
#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;