X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fhash.cpp;h=fe5e339c5aedc9ff0691ada988705fa0e6949898;hp=26e60592618e9e15847927e51e9dfec8626b6bd6;hb=95bd04e16acacde19fcfdcc722baf72b06dcdfee;hpb=4bd704ea84b36dc8e83db51cd5eab4111eb48c2a diff --git a/source/core/hash.cpp b/source/core/hash.cpp index 26e6059..fe5e339 100644 --- a/source/core/hash.cpp +++ b/source/core/hash.cpp @@ -10,7 +10,7 @@ http://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function http://www.isthe.com/chongo/tech/comp/fnv/index.html */ -unsigned hash32(const void *data, unsigned size, unsigned bits) +UInt32 hash32(const void *data, unsigned size, unsigned bits) { if(bits==0 || bits>32) throw invalid_argument("hash32"); @@ -28,15 +28,15 @@ unsigned hash32(const void *data, unsigned size, unsigned bits) return result; } -HashValue64 hash64(const void *data, unsigned size, unsigned bits) +UInt64 hash64(const void *data, unsigned size, unsigned bits) { if(bits==0 || bits>64) throw invalid_argument("hash64"); - static const HashValue64 prime = 1099511628211ULL; - static const HashValue64 offset = 14695981039346656037ULL; + static const UInt64 prime = 1099511628211ULL; + static const UInt64 offset = 14695981039346656037ULL; - HashValue64 result = offset; + UInt64 result = offset; for(unsigned i=0; i(data)+i))*prime;