summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 22:40:10 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 22:40:10 +0000
commitca549070d974b45ae586e10b74acc6e390741ae9 (patch)
tree4db7715a809421547ef61dea086528fc5f43cb58 /src/hashcomp.cpp
parent93188e6f716d77c7e2162d086e230c73c77292f8 (diff)
Add operators >> and << for irc::string and i/ostreams. m_cban utilises this
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3066 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 150bf77fe..652618a79 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -148,3 +148,17 @@ const char* irc::irc_char_traits::find(const char* s1, int n, char c)
s1++;
return s1;
}
+
+/* See hashcomp.h if you care about these... */
+std::ostream& operator<<(std::ostream &os, const irc::string &str)
+{
+ return os << str.c_str();
+}
+
+std::istream& operator>>(std::istream &is, irc::string &str)
+{
+ std::string tmp;
+ is >> tmp;
+ str = tmp.c_str();
+ return is;
+}