File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ vector<DcOptionsSet::ConnectionInfo> DcOptionsSet::find_all_connections(DcId dc_
110110 if (!static_options.empty ()) {
111111 options = std::move (static_options);
112112 } else {
113- bool have_ipv4 = td:: any_of (options, [](const auto &v) { return !v.option ->is_ipv6 (); });
113+ bool have_ipv4 = any_of (options, [](const auto &v) { return !v.option ->is_ipv6 (); });
114114 if (have_ipv4) {
115115 td::remove_if (options, [](auto &v) { return v.option ->is_ipv6 (); });
116116 }
@@ -122,13 +122,13 @@ vector<DcOptionsSet::ConnectionInfo> DcOptionsSet::find_all_connections(DcId dc_
122122 }
123123
124124 if (prefer_ipv6) {
125- bool have_ipv6 = td:: any_of (options, [](const auto &v) { return v.option ->is_ipv6 (); });
125+ bool have_ipv6 = any_of (options, [](const auto &v) { return v.option ->is_ipv6 (); });
126126 if (have_ipv6) {
127127 td::remove_if (options, [](auto &v) { return !v.option ->is_ipv6 (); });
128128 }
129129 }
130130
131- bool have_media_only = td:: any_of (options, [](const auto &v) { return v.option ->is_media_only (); });
131+ bool have_media_only = any_of (options, [](const auto &v) { return v.option ->is_media_only (); });
132132 if (have_media_only) {
133133 td::remove_if (options, [](auto &v) { return !v.option ->is_media_only (); });
134134 }
Original file line number Diff line number Diff line change 1515#include " td/utils/buffer.h"
1616#include " td/utils/common.h"
1717#include " td/utils/FlatHashMap.h"
18+ #include " td/utils/HashTableUtils.h"
1819#include " td/utils/logging.h"
1920#include " td/utils/misc.h"
2021#include " td/utils/port/RwMutex.h"
@@ -219,9 +220,9 @@ class BinlogKeyValue final : public KeyValueSyncInterface {
219220 binlog_->lazy_sync (std::move (promise));
220221 }
221222
222- std::unordered_map<string, string> prefix_get (Slice prefix) final {
223+ std::unordered_map<string, string, Hash<string> > prefix_get (Slice prefix) final {
223224 auto lock = rw_mutex_.lock_write ().move_as_ok ();
224- std::unordered_map<string, string> res;
225+ std::unordered_map<string, string, Hash<string> > res;
225226 for (const auto &kv : map_) {
226227 if (begins_with (kv.first , prefix)) {
227228 res.emplace (kv.first .substr (prefix.size ()), kv.second .first );
Original file line number Diff line number Diff line change 88
99#include " td/utils/common.h"
1010#include " td/utils/FlatHashMap.h"
11+ #include " td/utils/HashTableUtils.h"
1112#include " td/utils/Promise.h"
1213#include " td/utils/Slice.h"
1314
@@ -34,7 +35,7 @@ class KeyValueSyncInterface {
3435
3536 virtual string get (const string &key) = 0;
3637
37- virtual std::unordered_map<string, string> prefix_get (Slice prefix) = 0;
38+ virtual std::unordered_map<string, string, Hash<string> > prefix_get (Slice prefix) = 0;
3839
3940 virtual FlatHashMap<string, string> get_all () = 0;
4041
Original file line number Diff line number Diff line change 1212
1313namespace td {
1414
15- // More strict implementaions of flood control than FloodControlFast.
15+ // More strict implementations of flood control than FloodControlFast.
1616// Should be just fine for small counters.
1717class FloodControlStrict {
1818 public:
You can’t perform that action at this time.
0 commit comments