aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdutils/td/utils/FlatHashMapChunks.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2022-02-21 05:49:59 +0300
committerlevlam <levlam@telegram.org>2022-02-21 05:49:59 +0300
commitc9c9a73499ad09aa0a2dec872b862a1fbda185ba (patch)
treeafd4ff1325c10439bd7616045c7cd1260cf7270b /tdutils/td/utils/FlatHashMapChunks.h
parentf0a2ccd0fb68f5f6d11ba86f9488224ac68f3009 (diff)
Fix swap(fixed_vector) usages.
Diffstat (limited to 'tdutils/td/utils/FlatHashMapChunks.h')
-rw-r--r--tdutils/td/utils/FlatHashMapChunks.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/tdutils/td/utils/FlatHashMapChunks.h b/tdutils/td/utils/FlatHashMapChunks.h
index cac0d238b..05aab59fd 100644
--- a/tdutils/td/utils/FlatHashMapChunks.h
+++ b/tdutils/td/utils/FlatHashMapChunks.h
@@ -243,10 +243,9 @@ class FlatHashTableChunks {
return *this;
}
void swap(FlatHashTableChunks &other) noexcept {
- using std::swap;
- swap(nodes_, other.nodes_);
- swap(chunks_, other.chunks_);
- swap(used_nodes_, other.used_nodes_);
+ nodes_.swap(other.nodes_);
+ chunks_.swap(other.chunks_);
+ std::swap(used_nodes_, other.used_nodes_);
}
~FlatHashTableChunks() = default;
@@ -493,7 +492,7 @@ class FlatHashTableChunks {
CHECK(new_size >= Chunk::CHUNK_SIZE);
fixed_vector<Node> old_nodes(new_size);
fixed_vector<Chunk> chunks(new_size / Chunk::CHUNK_SIZE);
- std::swap(old_nodes, nodes_);
+ old_nodes.swap(nodes_);
chunks_ = std::move(chunks);
used_nodes_ = 0;