From 8684e3332cd69015f94d25ed8e6ff6f9d5d20238 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 23 May 2008 18:11:16 +0000 Subject: 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 --- src/modules/m_spanningtree/nickcollide.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_spanningtree') 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) -- cgit v1.2.3