From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/hashfunctioncasestring.cpp | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/hashfunctioncasestring.cpp (limited to 'src/hashfunctioncasestring.cpp') diff --git a/src/hashfunctioncasestring.cpp b/src/hashfunctioncasestring.cpp deleted file mode 100644 index 6361f45..0000000 --- a/src/hashfunctioncasestring.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include "hashfunctioncasestring.h" - -HashFunctionCaseString::HashFunctionCaseString() -{ -} - -HashFunctionCaseString::~HashFunctionCaseString() -{ -} - -unsigned long int HashFunctionCaseString::hash( const void *id ) -{ - const char *str = (const char *)id; - unsigned long int nPos = 0; - for( int j = 0; str[j] != '\0'; j++ ) - { - nPos = tolower(str[j]) + (nPos << 6) + (nPos << 16) - nPos; -// nPos += nPos<<16|(((unsigned long int)tolower(str[j]))<<((j*7)%24)); - } - return nPos; -} - -bool HashFunctionCaseString::cmpIDs( const void *id1, const void *id2 ) -{ - const char *str1 = (const char *)id1; - const char *str2 = (const char *)id2; - - int j; - for( j = 0; str1[j] != '\0' && str2[j] != '\0'; j++ ) - { - if( tolower(str1[j]) != tolower(str2[j]) ) - return false; - } - return (str1[j]==str2[j]); -} - -- cgit v1.2.3