X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhashcomp.cpp;h=a27a83f64ff89ef589b4ad540a7cf80f09be0d9f;hb=050e232499a04bb516c2dfee50b1f8c41ef1f5a6;hp=15be92bd7105cbd631824ea8076da9bbd50f59da;hpb=e4acbc95b8b6cd5b28d38a2242c02e8ff4991e4a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 15be92bd7..a27a83f64 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -49,8 +49,6 @@ using stdext::hash_map; * ******************************************************/ -using namespace irc::sockets; - /* convert a string to lowercase. Note following special circumstances * taken from RFC 1459. Many "official" server branches still hold to this * rule so i will too; @@ -70,9 +68,9 @@ void nspace::strlower(char *n) } #ifndef WIN32 -size_t nspace::hash::operator()(const string &s) const +size_t nspace::hash::operator()(const std::string &s) const #else -size_t nspace::hash_compare >::operator()(const string &s) const +size_t nspace::hash_compare >::operator()(const std::string &s) const #endif { /* XXX: NO DATA COPIES! :) @@ -101,8 +99,8 @@ size_t nspace::hash_compare >::operator()(co bool irc::StrHashComp::operator()(const std::string& s1, const std::string& s2) const { - unsigned char* n1 = (unsigned char*)s1.c_str(); - unsigned char* n2 = (unsigned char*)s2.c_str(); + const unsigned char* n1 = (const unsigned char*)s1.c_str(); + const unsigned char* n2 = (const unsigned char*)s2.c_str(); for (; *n1 && *n2; n1++, n2++) if (lowermap[*n1] != lowermap[*n2]) return false; @@ -398,7 +396,7 @@ irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque