summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Globals.h12
-rw-r--r--source/cWorld.cpp2
2 files changed, 1 insertions, 13 deletions
diff --git a/source/Globals.h b/source/Globals.h
index 9b057d262..65db1b436 100644
--- a/source/Globals.h
+++ b/source/Globals.h
@@ -200,15 +200,3 @@ public:
-//Common functions
-//Taken from http://stackoverflow.com/questions/11635/case-insensitive-string-comparison-in-c
-inline bool iequals(const std::string& a, const std::string& b)
-{
- unsigned int sz = a.size();
- if (b.size() != sz)
- return false;
- for (unsigned int i = 0; i < sz; ++i)
- if (tolower(a[i]) != tolower(b[i]))
- return false;
- return true;
-}
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index f904d8ceb..9531e23c3 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -1534,7 +1534,7 @@ bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_
cCSLock Lock(m_CSPlayers);
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
- if (iequals((*itr)->GetName(), a_PlayerName))
+ if (NoCaseCompare((*itr)->GetName(), a_PlayerName) == 0)
{
a_Callback.Item(*itr);
return true;