summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-26 15:51:28 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-26 15:51:28 +0200
commit9028c48512367394af2f790b53658bc6a197f95e (patch)
tree0d8b56785a7f0dc4acbf20f38c7250fd4e2931de /src/modules/m_spanningtree
parent90abe2cd475c8ca2e81626f565d173e9f56d1251 (diff)
m_spanningtree Replace #defines with references in DoCollision()
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/nickcollide.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp
index 3b5944e9f..2e840c6b8 100644
--- a/src/modules/m_spanningtree/nickcollide.cpp
+++ b/src/modules/m_spanningtree/nickcollide.cpp
@@ -57,16 +57,14 @@ int SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remot
bool bChangeLocal = true;
bool bChangeRemote = true;
- /* for brevity, don't use the User - use defines to avoid any copy */
- #define localts u->age
- #define localident u->ident
- #define localip u->GetIPString()
-
// If the timestamps are not equal only one of the users has to change nick,
// otherwise both have to change
+ const time_t localts = u->age;
if (remotets != localts)
{
/* first, let's see if ident@host matches. */
+ const std::string& localident = u->ident;
+ const std::string& localip = u->GetIPString();
bool SamePerson = (localident == remoteident)
&& (localip == remoteip);