From 333fe87ca7cbf66ec2468f726054180a0fe85316 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 17:13:18 +0200 Subject: Remove all non-member irc::string operators --- include/hashcomp.h | 72 ------------------------------------------------------ 1 file changed, 72 deletions(-) (limited to 'include') 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); -} -- cgit v1.2.3