From f0ebde21e57d340c3dca5a3ad0646d4b469bafaa Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 21 Feb 2006 19:01:33 +0000 Subject: Improved speed of Find() by passing reference to std::string instead of std::string itself git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3272 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/helperfuncs.h | 2 +- src/helperfuncs.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/helperfuncs.h b/include/helperfuncs.h index 70cc06da2..73e791c9d 100644 --- a/include/helperfuncs.h +++ b/include/helperfuncs.h @@ -60,7 +60,7 @@ void ServerNoticeAll(char* text, ...); void ServerPrivmsgAll(char* text, ...); void WriteWallOps(userrec *source, bool local_only, char* text, ...); void strlower(char *n); -userrec* Find(std::string nick); +userrec* Find(std::string &nick); chanrec* FindChan(const char* chan); long GetMaxBans(char* name); void purge_empty_chans(userrec* u); diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index c6e1bcd10..4f9814cda 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1013,7 +1013,7 @@ void strlower(char *n) /* Find a user record by nickname and return a pointer to it */ -userrec* Find(std::string nick) +userrec* Find(std::string &nick) { user_hash::iterator iter = clientlist.find(nick); -- cgit v1.2.3