mirror of
https://github.com/bkaradzic/bx.git
synced 2026-10-23 09:11:03 +00:00
Added a constexpr double math surface, and made fromString exact. (#451)
This commit is contained in:
committed by
GitHub
parent
59a1e105b6
commit
89eb1775db
@@ -115,7 +115,7 @@ uint32_t MurmurHash2A(const void * key, int len, uint32_t seed = 0)
|
||||
|
||||
while(len >= 4)
|
||||
{
|
||||
uint32_t k = *(uint32_t*)data;
|
||||
uint32_t k = bx::loadUnaligned<uint32_t>(data);
|
||||
|
||||
mmix(h,k);
|
||||
|
||||
@@ -206,11 +206,11 @@ uint32_t MurmurHash3_x86_32(const void * key, int len, uint32_t seed)
|
||||
//----------
|
||||
// body
|
||||
|
||||
const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);
|
||||
const uint8_t * blocks = data + nblocks*4;
|
||||
|
||||
for(int i = -nblocks; i; i++)
|
||||
{
|
||||
uint32_t k1 = blocks[i];
|
||||
uint32_t k1 = bx::loadUnaligned<uint32_t>(blocks + i*4);
|
||||
|
||||
k1 *= c1;
|
||||
k1 = rotl32(k1,15);
|
||||
|
||||
Reference in New Issue
Block a user