diff options
Diffstat (limited to '')
| -rw-r--r-- | src/hash.cpp | 20 | ||||
| -rw-r--r-- | src/hash.h | 6 | 
2 files changed, 26 insertions, 0 deletions
| diff --git a/src/hash.cpp b/src/hash.cpp index 3fb4f52..d428dd6 100644 --- a/src/hash.cpp +++ b/src/hash.cpp | |||
| @@ -22,6 +22,26 @@ template<> bool __cmpHashKeys<int>( int a, int b ) | |||
| 22 | return a == b; | 22 | return a == b; | 
| 23 | } | 23 | } | 
| 24 | 24 | ||
| 25 | template<> uint32_t __calcHashCode<const unsigned int>( const unsigned int k ) | ||
| 26 | { | ||
| 27 | return k; | ||
| 28 | } | ||
| 29 | |||
| 30 | template<> bool __cmpHashKeys<const unsigned int>( const unsigned int a, const unsigned int b ) | ||
| 31 | { | ||
| 32 | return a == b; | ||
| 33 | } | ||
| 34 | |||
| 35 | template<> uint32_t __calcHashCode<unsigned int>( unsigned int k ) | ||
| 36 | { | ||
| 37 | return k; | ||
| 38 | } | ||
| 39 | |||
| 40 | template<> bool __cmpHashKeys<unsigned int>( unsigned int a, unsigned int b ) | ||
| 41 | { | ||
| 42 | return a == b; | ||
| 43 | } | ||
| 44 | |||
| 25 | template<> | 45 | template<> | 
| 26 | uint32_t __calcHashCode<const char *>( const char * k ) | 46 | uint32_t __calcHashCode<const char *>( const char * k ) | 
| 27 | { | 47 | { | 
| @@ -534,6 +534,12 @@ template<> bool __cmpHashKeys<const int>( const int a, const int b ); | |||
| 534 | template<> uint32_t __calcHashCode<int>( int k ); | 534 | template<> uint32_t __calcHashCode<int>( int k ); | 
| 535 | template<> bool __cmpHashKeys<int>( int a, int b ); | 535 | template<> bool __cmpHashKeys<int>( int a, int b ); | 
| 536 | 536 | ||
| 537 | template<> uint32_t __calcHashCode<const unsigned int>( const unsigned int k ); | ||
| 538 | template<> bool __cmpHashKeys<const unsigned int>( const unsigned int a, const unsigned int b ); | ||
| 539 | |||
| 540 | template<> uint32_t __calcHashCode<unsigned int>( unsigned int k ); | ||
| 541 | template<> bool __cmpHashKeys<unsigned int>( unsigned int a, unsigned int b ); | ||
| 542 | |||
| 537 | template<> uint32_t __calcHashCode<const char *>( const char *k ); | 543 | template<> uint32_t __calcHashCode<const char *>( const char *k ); | 
| 538 | template<> bool __cmpHashKeys<const char *>( const char *a, const char *b ); | 544 | template<> bool __cmpHashKeys<const char *>( const char *a, const char *b ); | 
| 539 | 545 | ||
