From 906a91e917c22c793fe280ca657967a9e5d2e3b4 Mon Sep 17 00:00:00 2001 From: peavey Date: Mon, 11 Dec 2006 01:12:14 +0000 Subject: Fix case insensitive compare (operator ==) between irc::string and std::string and vice versa git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5925 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 45a216e69..67dec4e85 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -171,12 +171,12 @@ irc::string operator+ (irc::string& leftval, std::string& rightval) bool operator== (std::string& leftval, irc::string& rightval) { - return (leftval == std::string(rightval.c_str())); + return (leftval.c_str() == rightval); } bool operator== (irc::string& leftval, std::string& rightval) { - return (rightval == std::string(leftval.c_str())); + return (leftval == rightval.c_str()); } const char* irc::irc_char_traits::find(const char* s1, int n, char c) -- cgit v1.2.3