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/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/hash.h')
-rw-r--r-- | util/generic/hash.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/hash.h b/util/generic/hash.h index e46db21fa9..320691f0c9 100644 --- a/util/generic/hash.h +++ b/util/generic/hash.h @@ -1623,18 +1623,18 @@ public: } template <class TheKey> - bool contains(const TheKey& key) const { - return rep.find(key) != rep.end(); - } - bool contains(const key_type& key) const { - return rep.find(key) != rep.end(); - } - - template <class TheKey> - bool contains(const TheKey& key, insert_ctx& ins) { - return rep.find_i(key, ins) != rep.end(); - } - + bool contains(const TheKey& key) const { + return rep.find(key) != rep.end(); + } + bool contains(const key_type& key) const { + return rep.find(key) != rep.end(); + } + + template <class TheKey> + bool contains(const TheKey& key, insert_ctx& ins) { + return rep.find_i(key, ins) != rep.end(); + } + template <class TKey> T& operator[](const TKey& key) { insert_ctx ctx = nullptr; @@ -1935,10 +1935,10 @@ public: } template <class TheKey> - bool contains(const TheKey& key) const { - return rep.find(key) != rep.end(); - } - + bool contains(const TheKey& key) const { + return rep.find(key) != rep.end(); + } + template <class TKey> size_type count(const TKey& key) const { return rep.count(key); @@ -2021,9 +2021,9 @@ template <class Key, class T, class HF, class EqKey, class Alloc> inline bool operator!=(const THashMultiMap<Key, T, HF, EqKey, Alloc>& hm1, const THashMultiMap<Key, T, HF, EqKey, Alloc>& hm2) { return !(hm1 == hm2); } - -// Cannot name it just 'Hash' because it clashes with too many class members in the code. -template <class T> -size_t ComputeHash(const T& value) { - return THash<T>{}(value); -} + +// Cannot name it just 'Hash' because it clashes with too many class members in the code. +template <class T> +size_t ComputeHash(const T& value) { + return THash<T>{}(value); +} |