diff --git a/tdutils/td/utils/FlatHashMap.h b/tdutils/td/utils/FlatHashMap.h index a29585df4..756e04963 100644 --- a/tdutils/td/utils/FlatHashMap.h +++ b/tdutils/td/utils/FlatHashMap.h @@ -16,7 +16,7 @@ namespace td { -template , class EqualT = std::equal_to> +template > class FlatHashMapImpl { struct Node { KeyT first{}; @@ -66,7 +66,7 @@ class FlatHashMapImpl { CHECK(!empty()); } }; - using Self = FlatHashMapImpl; + using Self = FlatHashMapImpl; using NodeIterator = typename std::vector::iterator; using ConstNodeIterator = typename std::vector::const_iterator; @@ -357,7 +357,7 @@ class FlatHashMapImpl { } auto find_bucket_for_insert(const KeyT &key) const { size_t bucket = calc_bucket(key); - while (!EqualT()(nodes_[bucket].key(), key) && !is_key_empty(nodes_[bucket].key())) { + while (!(nodes_[bucket].key() == key) && !is_key_empty(nodes_[bucket].key())) { bucket++; if (bucket == nodes_.size()) { bucket = 0; @@ -378,10 +378,10 @@ class FlatHashMapImpl { } }; -//template , class EqualT = std::equal_to> -//using FlatHashMap = FlatHashMapImpl; +//template > +//using FlatHashMap = FlatHashMapImpl; -template , class EqualT = std::equal_to> -using FlatHashMap = std::unordered_map; +template > +using FlatHashMap = std::unordered_map; } // namespace td