summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-28 18:13:35 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-28 18:13:35 +0000
commit694e3ba4c752e75aaf69f4d03917134100f49b0b (patch)
tree0a9eb9b2bee3684b6f02d0beb5ff2e1225072979 /include
parent380ad4bb0199906bf0db6c148e3b3f0750a52ad7 (diff)
operators for std::string != irc::string and vice versa.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7604 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/hashcomp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 0556f4399..2ac346294 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -613,6 +613,20 @@ inline bool operator== (const irc::string& leftval, const std::string& rightval)
return (leftval == rightval.c_str());
}
+/* Define operators != for irc::string to std::string for easy comparison
+ */
+inline bool operator!= (const irc::string& leftval, const std::string& rightval)
+{
+ return !(leftval == rightval.c_str());
+}
+
+/* Define operators != for std::string to irc::string for easy comparison
+ */
+inline bool operator!= (const std::string& leftval, const irc::string& rightval)
+{
+ return !(leftval.c_str() == rightval);
+}
+
/** Assign an irc::string to a std::string.
*/
inline std::string assign(const irc::string &other) { return other.c_str(); }