diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:13:18 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:13:18 +0200 |
commit | 333fe87ca7cbf66ec2468f726054180a0fe85316 (patch) | |
tree | c5ca9a82406a90d69e4b03cad5388ebd077929b1 | |
parent | 7a1ca5baf2fcc6884042680c423ca614c41051c2 (diff) |
Remove all non-member irc::string operators
-rw-r--r-- | include/hashcomp.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index ddd590db2..8856d81bb 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -321,75 +321,3 @@ namespace irc long GetToken(); }; } - -/* Define operators for using >> and << with irc::string to an ostream on an istream. */ -/* This was endless fun. No. Really. */ -/* It was also the first core change Ommeh made, if anyone cares */ - -/** Operator << for irc::string - */ -inline std::ostream& operator<<(std::ostream &os, const irc::string &str) { return os << str.c_str(); } - -/** Operator >> for irc::string - */ -inline std::istream& operator>>(std::istream &is, irc::string &str) -{ - std::string tmp; - is >> tmp; - str = tmp.c_str(); - return is; -} - -/* Define operators for + and == with irc::string to std::string for easy assignment - * and comparison - * - * Operator + - */ -inline std::string operator+ (std::string& leftval, irc::string& rightval) -{ - return leftval + std::string(rightval.c_str()); -} - -/* Define operators for + and == with irc::string to std::string for easy assignment - * and comparison - * - * Operator + - */ -inline irc::string operator+ (irc::string& leftval, std::string& rightval) -{ - return leftval + irc::string(rightval.c_str()); -} - -/* Define operators for + and == with irc::string to std::string for easy assignment - * and comparison - * - * Operator == - */ -inline bool operator== (const std::string& leftval, const irc::string& rightval) -{ - return (leftval.c_str() == rightval); -} - -/* Define operators for + and == with irc::string to std::string for easy assignment - * and comparison - * - * Operator == - */ -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); -} |