diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
commit | 475c0a46f28166e83fd263badc7546377cddcabe (patch) | |
tree | 39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /util/generic/string_hash.h | |
parent | a6e0145a095c7bb3770d6e07aee301de5c73f96e (diff) | |
download | ydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/string_hash.h')
-rw-r--r-- | util/generic/string_hash.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/util/generic/string_hash.h b/util/generic/string_hash.h index b949c7a2d9..23f1798c68 100644 --- a/util/generic/string_hash.h +++ b/util/generic/string_hash.h @@ -1,21 +1,21 @@ -#pragma once - -#include <cstddef> - -// reduce code bloat and cycled includes, declare functions here -#if defined(_64_) && !defined(NO_CITYHASH) -ui64 CityHash64(const char* buf, size_t len) noexcept; -#else -size_t MurmurHashSizeT(const char* buf, size_t len) noexcept; -#endif - -namespace NHashPrivate { - template <typename C> - size_t ComputeStringHash(const C* ptr, size_t size) noexcept { -#if defined(_64_) && !defined(NO_CITYHASH) +#pragma once + +#include <cstddef> + +// reduce code bloat and cycled includes, declare functions here +#if defined(_64_) && !defined(NO_CITYHASH) +ui64 CityHash64(const char* buf, size_t len) noexcept; +#else +size_t MurmurHashSizeT(const char* buf, size_t len) noexcept; +#endif + +namespace NHashPrivate { + template <typename C> + size_t ComputeStringHash(const C* ptr, size_t size) noexcept { +#if defined(_64_) && !defined(NO_CITYHASH) return CityHash64((const char*)ptr, size * sizeof(C)); -#else +#else return MurmurHashSizeT((const char*)ptr, size * sizeof(C)); -#endif - } -} +#endif + } +} |