]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/hashcomp.h
Tidy up space indents so Om and w00t dont murder me
[user/henk/code/inspircd.git] / include / hashcomp.h
index 8e077a732a7383f8d80baa0a589b7e6e0a303f81..dc8c1ec81aa619e4bc0f8f5f8b4ccdc67022c078 100644 (file)
@@ -18,6 +18,8 @@
 #define _HASHCOMP_H_
 
 #include "inspircd_config.h"
+#include "socket.h"
+#include "hash_map.h"
 
 /*******************************************************
  * This file contains classes and templates that deal
  * backwards compatible with other code which is not
  * aware of irc::string.
  *******************************************************/
-
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
-
-#ifdef GCC3
-#define nspace __gnu_cxx
-#else
-#define nspace std
-#endif
-
 using namespace std;
 
 namespace nspace
@@ -129,4 +119,20 @@ namespace irc
        typedef basic_string<char, irc_char_traits, allocator<char> > string;
 }
 
+/* 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 */
+
+std::ostream& operator<<(std::ostream &os, const irc::string &str);
+std::istream& operator>>(std::istream &is, irc::string &str);
+
+/* Define operators for + and == with irc::string to std::string for easy assignment
+ * and comparison - Brain
+ */
+
+std::string operator+ (std::string& leftval, irc::string& rightval);
+irc::string operator+ (irc::string& leftval, std::string& rightval);
+bool operator== (std::string& leftval, irc::string& rightval);
+bool operator== (irc::string& leftval, std::string& rightval);
+
 #endif