Changeset 2107 for trunk/src/core/hash.cpp
 Timestamp:
 Nov 22, 2012, 9:31:18 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/core/hash.cpp
r2105 r2107 88 88 */ 89 89 90 uint32_t Hash<int8_t>::operator ()(int8_t x) 90 uint32_t Hash<int8_t>::operator ()(int8_t x) const 91 91 { 92 92 return Hash8((uint8_t)x); 93 93 } 94 94 95 uint32_t Hash<uint8_t>::operator ()(uint8_t x) 95 uint32_t Hash<uint8_t>::operator ()(uint8_t x) const 96 96 { 97 97 return Hash8(x); 98 98 } 99 99 100 uint32_t Hash<int16_t>::operator ()(int16_t x) 100 uint32_t Hash<int16_t>::operator ()(int16_t x) const 101 101 { 102 102 return Hash16((uint16_t)x); 103 103 } 104 104 105 uint32_t Hash<uint16_t>::operator ()(uint16_t x) 105 uint32_t Hash<uint16_t>::operator ()(uint16_t x) const 106 106 { 107 107 return Hash16(x); 108 108 } 109 109 110 uint32_t Hash<int32_t>::operator ()(int32_t x) 110 uint32_t Hash<int32_t>::operator ()(int32_t x) const 111 111 { 112 112 return Hash32((uint32_t)x); 113 113 } 114 114 115 uint32_t Hash<uint32_t>::operator ()(uint32_t x) 115 uint32_t Hash<uint32_t>::operator ()(uint32_t x) const 116 116 { 117 117 return Hash32(x); 118 118 } 119 119 120 uint32_t Hash<int64_t>::operator ()(int64_t x) 120 uint32_t Hash<int64_t>::operator ()(int64_t x) const 121 121 { 122 122 return Hash64((uint64_t)x); 123 123 } 124 124 125 uint32_t Hash<uint64_t>::operator ()(uint64_t x) 125 uint32_t Hash<uint64_t>::operator ()(uint64_t x) const 126 126 { 127 127 return Hash64(x); … … 132 132 */ 133 133 134 uint32_t Hash<half>::operator ()(half f) 134 uint32_t Hash<half>::operator ()(half f) const 135 135 { 136 136 return Hash16(f.bits); 137 137 } 138 138 139 uint32_t Hash<float>::operator ()(float f) 139 uint32_t Hash<float>::operator ()(float f) const 140 140 { 141 141 union { float tmp; uint32_t x; } u = { f }; … … 143 143 } 144 144 145 uint32_t Hash<double>::operator ()(double f) 145 uint32_t Hash<double>::operator ()(double f) const 146 146 { 147 147 union { double tmp; uint64_t x; } u = { f }; … … 163 163 } 164 164 165 uint32_t Hash<char const *>::operator ()(char const *s) 165 uint32_t Hash<char const *>::operator ()(char const *s) const 166 166 { 167 167 return HashCharString(s); 168 168 } 169 169 170 uint32_t Hash<String>::operator ()(String const &s) 170 uint32_t Hash<String>::operator ()(String const &s) const 171 171 { 172 172 return HashCharString(&s[0]);
Note: See TracChangeset
for help on using the changeset viewer.