]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Don't copy vars (faster) and also avoid a crash (non-const -> const)
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 23 May 2008 18:11:16 +0000 (18:11 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 23 May 2008 18:11:16 +0000 (18:11 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9795 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/nickcollide.cpp

index 9ef5b48f4620c4bc800b4f8c6d4e76319cbebc57..a33b77da412f8e0b8e6d4851692dc89b9a6604ab 100644 (file)
@@ -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)