diff options
author | zosimov <zosimov@yandex-team.ru> | 2022-02-10 16:50:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:32 +0300 |
commit | a1d67d6a31f789aa011250c3edce5751c0cadad2 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/hash_set.h | |
parent | a8f009e06d613c9567eb4c0f461dbed5e0d8092b (diff) | |
download | ydb-a1d67d6a31f789aa011250c3edce5751c0cadad2.tar.gz |
Restoring authorship annotation for <zosimov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/hash_set.h')
-rw-r--r-- | util/generic/hash_set.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/util/generic/hash_set.h b/util/generic/hash_set.h index 5c6387f19f..e8088cf23b 100644 --- a/util/generic/hash_set.h +++ b/util/generic/hash_set.h @@ -262,15 +262,15 @@ public: template <class Value, class HashFcn, class EqualKey, class Alloc> inline bool operator==(const THashSet<Value, HashFcn, EqualKey, Alloc>& hs1, const THashSet<Value, HashFcn, EqualKey, Alloc>& hs2) { - if (hs1.size() != hs2.size()) { - return false; - } - for (const auto& it : hs1) { + if (hs1.size() != hs2.size()) { + return false; + } + for (const auto& it : hs1) { if (!hs2.contains(it)) { - return false; - } - } - return true; + return false; + } + } + return true; } template <class Value, class HashFcn, class EqualKey, class Alloc> @@ -465,21 +465,21 @@ public: template <class Val, class HashFcn, class EqualKey, class Alloc> inline bool operator==(const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs1, const THashMultiSet<Val, HashFcn, EqualKey, Alloc>& hs2) { - if (hs1.size() != hs2.size()) { - return false; - } - EqualKey equalKey; - auto it = hs1.begin(); - while (it != hs1.end()) { - const auto& value = *it; - size_t count = 0; - for (; (it != hs1.end()) && (equalKey(*it, value)); ++it, ++count) { - } - if (hs2.count(value) != count) { - return false; - } - } - return true; + if (hs1.size() != hs2.size()) { + return false; + } + EqualKey equalKey; + auto it = hs1.begin(); + while (it != hs1.end()) { + const auto& value = *it; + size_t count = 0; + for (; (it != hs1.end()) && (equalKey(*it, value)); ++it, ++count) { + } + if (hs2.count(value) != count) { + return false; + } + } + return true; } template <class Val, class HashFcn, class EqualKey, class Alloc> |