diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-23 18:11:16 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-23 18:11:16 +0000 |
commit | 8684e3332cd69015f94d25ed8e6ff6f9d5d20238 (patch) | |
tree | 1a279af4eddba579edc9d336b5cf277e8554fe4e /src/modules | |
parent | 23b17c9b3a190d4ca4b49bb4bf656e2238b714ed (diff) |
Don't copy vars (faster) and also avoid a crash (non-const -> const)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9795 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/nickcollide.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp index 9ef5b48f4..a33b77da4 100644 --- a/src/modules/m_spanningtree/nickcollide.cpp +++ b/src/modules/m_spanningtree/nickcollide.cpp @@ -49,10 +49,10 @@ int TreeSocket::DoCollision(User *u, time_t remotets, const std::string &remotei bool bChangeLocal = true; bool bChangeRemote = true; - /* for brevity, don't use the User */ - time_t localts = u->age; - const std::string localident = u->ident; - const std::string localip = u->GetIPString(); + /* 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() /* mmk. let's do this again. */ if (remotets == localts) |