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:
Yuri Kunde Schlesner 2018-01-15 01:27:30 -08:00
parent d93ee65164
commit f081388afe
2 changed files with 36 additions and 27 deletions

View file

@ -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