diff --git a/tdutils/td/utils/FlatHashMapChunks.h b/tdutils/td/utils/FlatHashMapChunks.h index 81a2c4819..70fc36bac 100644 --- a/tdutils/td/utils/FlatHashMapChunks.h +++ b/tdutils/td/utils/FlatHashMapChunks.h @@ -469,7 +469,8 @@ class FlatHashTableChunks { struct ChunkIt { size_t chunk_i; size_t chunk_mask; - size_t shift{}; + size_t shift; + size_t pos() const { return chunk_i; } @@ -482,7 +483,7 @@ class FlatHashTableChunks { }; ChunkIt get_chunk_it(size_t chunk_i) { - return {chunk_i, chunks_.size() - 1}; + return ChunkIt{chunk_i, chunks_.size() - 1, 0}; } HashInfo calc_hash(const KeyT &key) { diff --git a/tdutils/td/utils/MapNode.h b/tdutils/td/utils/MapNode.h index 25cc84448..cad2ae9b3 100644 --- a/tdutils/td/utils/MapNode.h +++ b/tdutils/td/utils/MapNode.h @@ -54,7 +54,7 @@ struct MapNode { DCHECK(empty()); DCHECK(!other.empty()); first = std::move(other.first); - other.first = KeyT{}; + other.first = KeyT(); new (&second) ValueT(std::move(other.second)); other.second.~ValueT(); } diff --git a/tdutils/td/utils/SetNode.h b/tdutils/td/utils/SetNode.h index 7e99cb1fb..6d7b6e5ff 100644 --- a/tdutils/td/utils/SetNode.h +++ b/tdutils/td/utils/SetNode.h @@ -20,7 +20,7 @@ struct SetNode { using public_type = const KeyT; using second_type = KeyT; // TODO: remove second_type? - KeyT first{}; + KeyT first; const KeyT &key() const { return first; @@ -30,7 +30,8 @@ struct SetNode { return first; } - SetNode() = default; + SetNode(): first() { + } explicit SetNode(KeyT key) : first(std::move(key)) { } SetNode(const SetNode &other) = delete; @@ -42,7 +43,7 @@ struct SetNode { DCHECK(empty()); DCHECK(!other.empty()); first = std::move(other.first); - other.first = KeyT{}; + other.first = KeyT(); } ~SetNode() = default; @@ -71,7 +72,7 @@ struct SetNode 28 * sizeof(void struct Impl { using second_type = KeyT; - KeyT first{}; + KeyT first; template explicit Impl(InputKeyT &&key) : first(std::forward(key)) { @@ -99,7 +100,7 @@ struct SetNode 28 * sizeof(void return impl_->first; } - SetNode() { + SetNode(): impl_() { } explicit SetNode(KeyT key) : impl_(td::make_unique(std::move(key))) { }