diff options
author | tobo <tobo@yandex-team.com> | 2022-09-09 11:15:36 +0300 |
---|---|---|
committer | tobo <tobo@yandex-team.com> | 2022-09-09 11:15:36 +0300 |
commit | e96ef596aca8afaf0326b57001ff56fbdd643e8a (patch) | |
tree | 25ae6137d298b7f53fd06e1c25066b7409f4ea8e /util/generic/hash.cpp | |
parent | 5491c0676017f1d89131e40a7b910e9a28c8fde2 (diff) | |
download | ydb-e96ef596aca8afaf0326b57001ff56fbdd643e8a.tar.gz |
prepare to split hash.h into hash_table.h hash.h and multi_hash_map.h
Diffstat (limited to 'util/generic/hash.cpp')
-rw-r--r-- | util/generic/hash.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/util/generic/hash.cpp b/util/generic/hash.cpp index a674ee4538..b4aac775bf 100644 --- a/util/generic/hash.cpp +++ b/util/generic/hash.cpp @@ -1,51 +1 @@ #include "hash.h" - -#include <util/string/escape.h> -#include <util/string/cast.h> - -const void* const _yhashtable_empty_data[] = {(void*)3, nullptr, (void*)1}; - -TString NPrivate::MapKeyToString(TStringBuf key) { - constexpr size_t HASH_KEY_MAX_LENGTH = 500; - try { - return EscapeC(key.substr(0, HASH_KEY_MAX_LENGTH)); - } catch (...) { - return "TStringBuf"; - } -} - -TString NPrivate::MapKeyToString(unsigned short key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(short key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(unsigned int key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(int key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(unsigned long key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(long key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(unsigned long long key) { - return ToString(key); -} - -TString NPrivate::MapKeyToString(long long key) { - return ToString(key); -} - -void NPrivate::ThrowKeyNotFoundInHashTableException(const TStringBuf keyRepresentation) { - ythrow yexception() << "Key not found in hashtable: " << keyRepresentation; -} |