summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-28 15:40:19 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-28 15:40:19 +0300
commit69f9daf9fe44bb43bd9112be428438512deca14b (patch)
tree69cfb3c0f54a786c856c1c80865e98d70d1fadfb /src/guild.cpp
parent2dc730f9aba84fc9fe684fd2af9864df97580502 (diff)
downloadplus-69f9daf9fe44bb43bd9112be428438512deca14b.tar.gz
plus-69f9daf9fe44bb43bd9112be428438512deca14b.tar.bz2
plus-69f9daf9fe44bb43bd9112be428438512deca14b.tar.xz
plus-69f9daf9fe44bb43bd9112be428438512deca14b.zip
Sort guild list members case-insensitive.
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp13
1 files changed, 12 insertions, 1 deletions
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;