From 69f9daf9fe44bb43bd9112be428438512deca14b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Aug 2011 15:40:19 +0300 Subject: Sort guild list members case-insensitive. --- src/guild.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/guild.cpp b/src/guild.cpp index acf35bac9..d79e6fd17 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -24,6 +24,8 @@ #include "actorspritemanager.h" +#include "utils/stringutils.h" + #include "debug.h" class SortGuildFunctor @@ -40,7 +42,16 @@ class SortGuildFunctor if (m1->getPos() != m2->getPos()) return m1->getPos() < m2->getPos(); - return m1->getName() < m2->getName(); + if (m1->getName() != m2->getName()) + { + std::string s1 = m1->getName(); + std::string s2 = m2->getName(); + toLower(s1); + toLower(s2); + return s1 < s2; + } + return false; +// return m1->getName() < m2->getName(); } } guildSorter; -- cgit v1.2.3-70-g09d2