diff options
| author | levlam <levlam@telegram.org> | 2022-02-21 00:33:19 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-02-21 00:33:19 +0300 |
| commit | 9e8b2489bd69644b2da7716f7a249c28b1af61e8 (patch) | |
| tree | c9e582fdebe90b4944799d5a32c1311625c747df /tdutils/td/utils/FlatHashMapChunks.h | |
| parent | 77ccc13181868ab8660162f76a9ed6a175d4c0d6 (diff) | |
Keep the first value from initializer_list.
Diffstat (limited to 'tdutils/td/utils/FlatHashMapChunks.h')
| -rw-r--r-- | tdutils/td/utils/FlatHashMapChunks.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tdutils/td/utils/FlatHashMapChunks.h b/tdutils/td/utils/FlatHashMapChunks.h index 765521b65..aaa9f532c 100644 --- a/tdutils/td/utils/FlatHashMapChunks.h +++ b/tdutils/td/utils/FlatHashMapChunks.h @@ -6,7 +6,6 @@ // #pragma once -#include "td/utils/algorithm.h" #include "td/utils/bits.h" #include "td/utils/common.h" #include "td/utils/FlatHashMapLinear.h" @@ -224,9 +223,9 @@ class FlatHashTableChunks { FlatHashTableChunks(std::initializer_list<Node> nodes) { reserve(nodes.size()); - for (auto &node : reversed(nodes)) { + for (auto &node : nodes) { CHECK(!node.empty()); - if (count(node.first) > 0) { + if (count(node.key()) > 0) { continue; } emplace_node(Node{node.first, node.second}); |
