mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 07:11:33 +00:00
Support unaligned blocks
This commit is contained in:
parent
86bf9d5b8d
commit
f85053d78c
1 changed files with 5 additions and 1 deletions
6
extern/smhasher/MurmurHash3.cpp
vendored
6
extern/smhasher/MurmurHash3.cpp
vendored
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include "MurmurHash3.h"
|
#include "MurmurHash3.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Platform-specific functions and macros
|
// Platform-specific functions and macros
|
||||||
|
|
||||||
|
@ -47,7 +49,9 @@ inline uint64_t rotl64 ( uint64_t x, int8_t r )
|
||||||
|
|
||||||
FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, int i )
|
FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, int i )
|
||||||
{
|
{
|
||||||
return p[i];
|
uint64_t result = 0;
|
||||||
|
std::memcpy(&result, p + i, sizeof(result));
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------
|
//----------
|
||||||
|
|
Loading…
Reference in a new issue