summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hashcomp.h4
-rw-r--r--include/u_listmode.h3
-rw-r--r--src/hashcomp.cpp4
3 files changed, 5 insertions, 6 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 323b35980..79c7627a0 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -530,8 +530,8 @@ std::istream& operator>>(std::istream &is, irc::string &str);
*/
std::string operator+ (std::string& leftval, irc::string& rightval);
irc::string operator+ (irc::string& leftval, std::string& rightval);
-bool operator== (std::string& leftval, irc::string& rightval);
-bool operator== (irc::string& leftval, std::string& rightval);
+bool operator== (const std::string& leftval, const irc::string& rightval);
+bool operator== (const irc::string& leftval, const std::string& rightval);
std::string assign(const irc::string &other);
irc::string assign(const std::string &other);
diff --git a/include/u_listmode.h b/include/u_listmode.h
index d5770d9b7..ce720f926 100644
--- a/include/u_listmode.h
+++ b/include/u_listmode.h
@@ -102,12 +102,11 @@ class ListModeBase : public ModeHandler
{
modelist* el;
channel->GetExt(infokey, el);
- irc::string csp(assign(parameter));
if (el)
{
for (modelist::iterator it = el->begin(); it != el->end(); it++)
{
- if(csp == it->mask)
+ if(parameter == it->mask)
{
return std::make_pair(true, parameter);
}
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());
}