diff options
Diffstat (limited to 'src/hash.h')
-rw-r--r-- | src/hash.h | 37 |
1 files changed, 14 insertions, 23 deletions
@@ -18,10 +18,10 @@ enum eHashException | |||
18 | }; | 18 | }; |
19 | 19 | ||
20 | template<typename T> | 20 | template<typename T> |
21 | uint32_t __calcHashCode( T k ); | 21 | uint32_t __calcHashCode( const T &k ); |
22 | 22 | ||
23 | template<typename T> | 23 | template<typename T> |
24 | bool __cmpHashKeys( T a, T b ); | 24 | bool __cmpHashKeys( const T &a, const T &b ); |
25 | 25 | ||
26 | struct __calcNextTSize_fast | 26 | struct __calcNextTSize_fast |
27 | { | 27 | { |
@@ -649,31 +649,22 @@ protected: | |||
649 | sizecalc szCalc; | 649 | sizecalc szCalc; |
650 | }; | 650 | }; |
651 | 651 | ||
652 | template<> uint32_t __calcHashCode<const int>( const int k ); | 652 | template<> uint32_t __calcHashCode<int>( const int &k ); |
653 | template<> bool __cmpHashKeys<const int>( const int a, const int b ); | 653 | template<> bool __cmpHashKeys<int>( const int &a, const int &b ); |
654 | 654 | ||
655 | template<> uint32_t __calcHashCode<int>( int k ); | 655 | template<> uint32_t __calcHashCode<unsigned int>( const unsigned int &k ); |
656 | template<> bool __cmpHashKeys<int>( int a, int b ); | 656 | template<> bool __cmpHashKeys<unsigned int>( const unsigned int &a, const unsigned int &b ); |
657 | 657 | ||
658 | template<> uint32_t __calcHashCode<const unsigned int>( const unsigned int k ); | 658 | template<> uint32_t __calcHashCode<const char *>( const char * const &k ); |
659 | template<> bool __cmpHashKeys<const unsigned int>( const unsigned int a, const unsigned int b ); | 659 | template<> bool __cmpHashKeys<const char *>( const char * const &a, const char * const &b ); |
660 | 660 | ||
661 | template<> uint32_t __calcHashCode<unsigned int>( unsigned int k ); | 661 | template<> uint32_t __calcHashCode<char *>( char * const &k ); |
662 | template<> bool __cmpHashKeys<unsigned int>( unsigned int a, unsigned int b ); | 662 | template<> bool __cmpHashKeys<char *>( char * const &a, char * const &b ); |
663 | 663 | ||
664 | template<> uint32_t __calcHashCode<const char *>( const char *k ); | 664 | template<> uint32_t __calcHashCode<std::string>( const std::string &k ); |
665 | template<> bool __cmpHashKeys<const char *>( const char *a, const char *b ); | 665 | template<> bool __cmpHashKeys<std::string>( const std::string &a, const std::string &b ); |
666 | 666 | ||
667 | template<> uint32_t __calcHashCode<char *>( char *k ); | 667 | template<> uint32_t __calcHashCode<Hashable>( const Hashable &k ); |
668 | template<> bool __cmpHashKeys<char *>( char *a, char *b ); | 668 | template<> bool __cmpHashKeys<Hashable>( const Hashable &a, const Hashable &b ); |
669 | |||
670 | template<> uint32_t __calcHashCode<const std::string>( const std::string k ); | ||
671 | template<> bool __cmpHashKeys<const std::string>( const std::string a, const std::string b ); | ||
672 | |||
673 | template<> uint32_t __calcHashCode<std::string>( std::string k ); | ||
674 | template<> bool __cmpHashKeys<std::string>( std::string a, std::string b ); | ||
675 | |||
676 | template<> uint32_t __calcHashCode<Hashable &>( Hashable &k ); | ||
677 | template<> bool __cmpHashKeys<Hashable &>( Hashable &a, Hashable &b ); | ||
678 | 669 | ||
679 | #endif | 670 | #endif |