From 2166d5e63c28a520536a9b3c5379e388fb17bc57 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 2 Mar 2006 17:51:09 +0000 Subject: Slight optimization here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3434 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 11147298f..90c1ddcf9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -283,9 +283,12 @@ bool userrec::HasPermission(std::string &command) bool userrec::AddBuffer(std::string a) { std::string b = ""; - for (unsigned int i = 0; i < a.length(); i++) - if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) - b = b + a[i]; + char* n = (char*)a.c_str(); + for (char* i = n; *i; i++) + { + if ((*i != '\r') && (*i != '\0') && (*i != 7)) + b = b + *i; + } std::stringstream stream(recvq); stream << b; recvq = stream.str(); -- cgit v1.2.3