From 07ca4f5789bb54f9bfe0e24e68c5515d9708d9ee Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 Mar 2007 15:29:47 +0000 Subject: Fix the operator== for irc::string -> std::string to be const&, the lack of const was stopping them being used in certain situations, this saves us a bunch of assign() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6643 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hashcomp.cpp') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 53483c748..b78b66af6 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -148,12 +148,12 @@ irc::string operator+ (irc::string& leftval, std::string& rightval) return leftval + irc::string(rightval.c_str()); } -bool operator== (std::string& leftval, irc::string& rightval) +bool operator== (const std::string& leftval, const irc::string& rightval) { return (leftval.c_str() == rightval); } -bool operator== (irc::string& leftval, std::string& rightval) +bool operator== (const irc::string& leftval, const std::string& rightval) { return (leftval == rightval.c_str()); } -- cgit v1.2.3