Common: Adapt CityHash code to match our codebase better
- Use #pragma once instead of guards - Move header typedefs to implementation file - Enclose in Common namespace
This commit is contained in:
parent
d93ee65164
commit
f081388afe
2 changed files with 36 additions and 27 deletions
|
@ -42,6 +42,12 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
typedef uint8_t uint8;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint64_t uint64;
|
||||
|
||||
namespace Common {
|
||||
|
||||
static uint64 UNALIGNED_LOAD64(const char* p) {
|
||||
uint64 result;
|
||||
memcpy(&result, p, sizeof(result));
|
||||
|
@ -648,3 +654,5 @@ uint128 CityHashCrc128(const char* s, size_t len) {
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue