From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/hash.cpp | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'src/stable/hash.cpp') diff --git a/src/stable/hash.cpp b/src/stable/hash.cpp index f44104b..85a13c7 100644 --- a/src/stable/hash.cpp +++ b/src/stable/hash.cpp @@ -12,58 +12,58 @@ namespace Bu { subExceptionDef( HashException ) } template<> uint32_t Bu::__calcHashCode( const char * const &k ) { - if (k == NULL) - { - return 0; - } - - unsigned long int nPos = 0; - for( const char *s = k; *s; s++ ) - { - nPos = *s + (nPos << 6) + (nPos << 16) - nPos; - } + if (k == NULL) + { + return 0; + } + + unsigned long int nPos = 0; + for( const char *s = k; *s; s++ ) + { + nPos = *s + (nPos << 6) + (nPos << 16) - nPos; + } - return nPos; + return nPos; } template<> bool Bu::__cmpHashKeys( const char * const &a, const char * const &b ) { - if( a == b ) - return true; + if( a == b ) + return true; - for(int j=0; a[j] == b[j]; j++ ) - if( a[j] == '\0' ) - return true; + for(int j=0; a[j] == b[j]; j++ ) + if( a[j] == '\0' ) + return true; - return false; + return false; } template<> uint32_t Bu::__calcHashCode( char * const &k ) { - if (k == NULL) - { - return 0; - } - - unsigned long int nPos = 0; - for( const char *s = k; *s; s++ ) - { - nPos = *s + (nPos << 6) + (nPos << 16) - nPos; - } + if (k == NULL) + { + return 0; + } + + unsigned long int nPos = 0; + for( const char *s = k; *s; s++ ) + { + nPos = *s + (nPos << 6) + (nPos << 16) - nPos; + } - return nPos; + return nPos; } template<> bool Bu::__cmpHashKeys( char * const &a, char * const &b ) { - if( a == b ) - return true; + if( a == b ) + return true; - for(int j=0; a[j] == b[j]; j++ ) - if( a[j] == '\0' ) - return true; + for(int j=0; a[j] == b[j]; j++ ) + if( a[j] == '\0' ) + return true; - return false; + return false; } -- cgit v1.2.3