summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 12:06:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 12:06:34 +0300
commit81e2cccfde65ccf7588067bd3896fd5172b5079d (patch)
tree94303d63827024522697e072ad9881cc1776cf65 /src
parent928145e71e073842c7e8947eda7e56050229b5f2 (diff)
downloadmv-81e2cccfde65ccf7588067bd3896fd5172b5079d.tar.gz
mv-81e2cccfde65ccf7588067bd3896fd5172b5079d.tar.bz2
mv-81e2cccfde65ccf7588067bd3896fd5172b5079d.tar.xz
mv-81e2cccfde65ccf7588067bd3896fd5172b5079d.zip
add anonimous namespace in guild.
Diffstat (limited to 'src')
-rw-r--r--src/guild.cpp49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index 7ee97aaa9..c6411e774 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -28,32 +28,35 @@
#include "debug.h"
-static class SortGuildFunctor final
+namespace
{
- public:
- bool operator() (const GuildMember *const m1,
- const GuildMember *const m2) const
- {
- if (!m1 || !m2)
- return false;
-
- if (m1->getOnline() != m2->getOnline())
- return m1->getOnline() > m2->getOnline();
-
- if (m1->getPos() != m2->getPos())
- return m1->getPos() > m2->getPos();
-
- if (m1->getName() != m2->getName())
+ static class SortGuildFunctor final
+ {
+ public:
+ bool operator() (const GuildMember *const m1,
+ const GuildMember *const m2) const
{
- std::string s1 = m1->getName();
- std::string s2 = m2->getName();
- toLower(s1);
- toLower(s2);
- return s1 < s2;
+ if (!m1 || !m2)
+ return false;
+
+ if (m1->getOnline() != m2->getOnline())
+ return m1->getOnline() > 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;
+ }
+ return false;
}
- return false;
- }
-} guildSorter;
+ } guildSorter;
+} // namespace
GuildMember::GuildMember(Guild *const guild, const int accountId,
const int charId, const std::string &name):