From 0b460e6f324aa72cdbfb4143918971d582f62a77 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 7 Feb 2007 19:56:35 +0000 Subject: Ident fixes, removal of some old craq we dont use. cgiirc optimizations and tidyups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6541 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/hashcomp.cpp') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 55b3f9b58..f8d131675 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -39,10 +39,6 @@ * Scandanavian Comparisons: The characters [, ], \ will * be considered the lowercase of {, } and |. * - * This file also contains hashing methods for hashing - * insp_inaddr structs, we use this if we want to cache IP - * addresses. - * ******************************************************/ using namespace irc::sockets; @@ -65,13 +61,6 @@ void nspace::strlower(char *n) } } -size_t nspace::hash::operator()(const insp_inaddr &a) const -{ - size_t q; - memcpy(&q,&a,sizeof(size_t)); - return q; -} - size_t nspace::hash::operator()(const string &s) const { /* XXX: NO DATA COPIES! :) @@ -104,18 +93,6 @@ bool irc::StrHashComp::operator()(const std::string& s1, const std::string& s2) return (lowermap[*n1] == lowermap[*n2]); } -bool irc::InAddr_HashComp::operator()(const insp_inaddr &s1, const insp_inaddr &s2) const -{ -#ifdef IPV6 - for (int n = 0; n < 16; n++) - if (s2.s6_addr[n] != s1.s6_addr[n]) - return false; - return true; -#else - return (s1.s_addr == s1.s_addr); -#endif -} - /****************************************************** * * This is the implementation of our special irc::string -- cgit v1.2.3