diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-07 21:53:30 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-07 21:53:30 +0000 |
commit | 911676479377723f9672e2ed0e2b03e15412f2df (patch) | |
tree | 12911d6d666dc65dd6f9fd6a686e84867e5f06ce /include | |
parent | 1bf397ca49f5433915a9a15776d8debedd6ff936 (diff) |
Masterful rewrite of User::AddBuffer to remove a string copy (and make more efficient) thanks to some nifty string manipulations. This should provide benefit on highly loaded nodes. This has *not* been thoroughly tested considering it's criticality, but I have spent the past ~4 hours writing and testing it, and it seems ok.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9661 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/users.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 229edcfa2..9a7b9a6e7 100644 --- a/include/users.h +++ b/include/users.h @@ -807,7 +807,7 @@ class CoreExport User : 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(std::string a); + bool AddBuffer(const 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) |