summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-07-20 14:32:55 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2017-07-21 15:41:51 +0200
commit55a5ffdf5c3e44379aaa61590156bd989358579f (patch)
tree9ecb3b3df53005e085fd589dbaf4a9a9319b4af0 /src/StringUtils.cpp
parentRemove alignment macros (diff)
downloadcuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar.gz
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar.bz2
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar.lz
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar.xz
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.tar.zst
cuberite-55a5ffdf5c3e44379aaa61590156bd989358579f.zip
Diffstat (limited to 'src/StringUtils.cpp')
-rw-r--r--src/StringUtils.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp
index 4ff556277..42d736a8c 100644
--- a/src/StringUtils.cpp
+++ b/src/StringUtils.cpp
@@ -329,11 +329,9 @@ AString StrToUpper(const AString & s)
int NoCaseCompare(const AString & s1, const AString & s2)
{
#ifdef _MSC_VER
- // MSVC has stricmp that compares case-insensitive:
return _stricmp(s1.c_str(), s2.c_str());
#else
- // Do it the hard way - convert both strings to lowercase:
- return StrToLower(s1).compare(StrToLower(s2));
+ return strcasecmp(s1.c_str(), s2.c_str());
#endif // else _MSC_VER
}