mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Support unaligned blocks
This commit is contained in:
parent
86bf9d5b8d
commit
f85053d78c
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…
x
Reference in New Issue
Block a user