aboutsummaryrefslogtreecommitdiffstats
path: root/util/digest/city.cpp
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-06-28 13:15:44 +0300
committerthegeorg <thegeorg@yandex-team.ru>2022-06-28 13:15:44 +0300
commitb13fbd750496fa994449f37c8c8a49bed18ccd6e (patch)
treec71de4a67b2cd527edae044d902d5ffdcce5473e /util/digest/city.cpp
parent7a8efeb2c9c204feb9cc44b987708e97f05a8aec (diff)
downloadydb-b13fbd750496fa994449f37c8c8a49bed18ccd6e.tar.gz
util: Drop NO_CITYHASH point of customisation
ref:613556c5a389af24a29e4fdef6ec5dfeee33bd39
Diffstat (limited to 'util/digest/city.cpp')
-rw-r--r--util/digest/city.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/util/digest/city.cpp b/util/digest/city.cpp
index a1436a47e0..c0c7c1a2e9 100644
--- a/util/digest/city.cpp
+++ b/util/digest/city.cpp
@@ -1,5 +1,3 @@
-#ifndef NO_CITYHASH
-
// Copyright (c) 2011 Google, Inc.
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -29,24 +27,24 @@
// possible hash functions, by using SIMD instructions, or by
// compromising on hash quality.
- #include "city.h"
+#include "city.h"
using uint8 = ui8;
using uint32 = ui32;
using uint64 = ui64;
- #include <util/system/unaligned_mem.h>
- #include <util/generic/algorithm.h>
+#include <util/system/unaligned_mem.h>
+#include <util/generic/algorithm.h>
using namespace std;
//#define UNALIGNED_LOAD64(p) (*(const uint64*)(p))
//#define UNALIGNED_LOAD32(p) (*(const uint32*)(p))
- #define UNALIGNED_LOAD64(p) (ReadUnaligned<uint64>((const void*)(p)))
- #define UNALIGNED_LOAD32(p) (ReadUnaligned<uint32>((const void*)(p)))
+#define UNALIGNED_LOAD64(p) (ReadUnaligned<uint64>((const void*)(p)))
+#define UNALIGNED_LOAD32(p) (ReadUnaligned<uint32>((const void*)(p)))
- #define LIKELY(x) Y_LIKELY(!!(x))
+#define LIKELY(x) Y_LIKELY(!!(x))
// Some primes between 2^63 and 2^64 for various uses.
static const uint64 k0 = 0xc3a5c85c97cb3127ULL;
@@ -309,5 +307,3 @@ uint128 CityHash128(const char* s, size_t len) noexcept {
return CityHash128WithSeed(s, len, uint128(k0, k1));
}
}
-
-#endif