From 4bf95512bc85eb8bdcbf48a00a52a23bf50b296b Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 17 Aug 2006 14:16:15 +0000 Subject: userrec::AddBuffer and userrec::Write end up copying the const std::string& into a non-const to make use of it, why not just pass std::string and let the compiler do the copy when passing it? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4933 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index 9b3292caf..b292cd998 100644 --- a/include/users.h +++ b/include/users.h @@ -447,7 +447,7 @@ class userrec : public connection * @param a The string to add to the users read buffer * @return True if the string was successfully added to the read buffer */ - bool AddBuffer(const std::string &a); + bool AddBuffer(std::string a); /** This method returns true if the buffer contains at least one carriage return * character (e.g. one complete line may be read) @@ -596,7 +596,7 @@ class userrec : public connection /** Write text to this user, appending CR/LF. * @param text A std::string to send to the user */ - void Write(const std::string &text); + void Write(std::string text); /** Write text to this user, appending CR/LF. * @param text The format string for text to send to the user -- cgit v1.2.3