summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp57
1 files changed, 27 insertions, 30 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index 87c06ec2f..575220cde 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -30,40 +30,37 @@
#include "debug.h"
-namespace
+static class SortGuildFunctor final
{
- static class SortGuildFunctor final
- {
- public:
- A_DEFAULT_COPY(SortGuildFunctor)
+ public:
+ A_DEFAULT_COPY(SortGuildFunctor)
- bool operator() (const GuildMember *const m1,
- const GuildMember *const m2) const
- {
- if ((m1 == nullptr) || (m2 == nullptr))
- return false;
-
- if (m1->getOnline() != m2->getOnline())
- {
- return static_cast<int>(m1->getOnline()) >
- static_cast<int>(m2->getOnline());
- }
-
- if (m1->getPos() != m2->getPos())
- return m1->getPos() > m2->getPos();
-
- if (m1->getName() != m2->getName())
- {
- std::string s1 = m1->getName();
- std::string s2 = m2->getName();
- toLower(s1);
- toLower(s2);
- return s1 < s2;
- }
+ bool operator() (const GuildMember *const m1,
+ const GuildMember *const m2) const
+ {
+ if ((m1 == nullptr) || (m2 == nullptr))
return false;
+
+ if (m1->getOnline() != m2->getOnline())
+ {
+ return static_cast<int>(m1->getOnline()) >
+ static_cast<int>(m2->getOnline());
}
- } guildSorter;
-} // namespace
+
+ if (m1->getPos() != m2->getPos())
+ return m1->getPos() > m2->getPos();
+
+ if (m1->getName() != m2->getName())
+ {
+ std::string s1 = m1->getName();
+ std::string s2 = m2->getName();
+ toLower(s1);
+ toLower(s2);
+ return s1 < s2;
+ }
+ return false;
+ }
+} guildSorter;
GuildMember::GuildMember(Guild *const guild,
const BeingId accountId,