]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
operators for std::string != irc::string and vice versa.
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 28 Jul 2007 18:13:35 +0000 (18:13 +0000)
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 28 Jul 2007 18:13:35 +0000 (18:13 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7604 e03df62e-2008-0410-955e-edbf42e46eb7

include/hashcomp.h

index 0556f4399aefda9fb46042f0a0f24942fbfd3755..2ac346294987256eb3935e45cb3a32cf26ea8c49 100644 (file)
@@ -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(); }