From bcc2adeb47dd7540e6a1225003ed94c5e7940025 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 8 Feb 2022 00:04:34 +0300 Subject: [PATCH] Fix includes and formatting. --- td/telegram/AnimationsManager.h | 3 +-- td/telegram/AudiosManager.h | 1 - td/telegram/BackgroundManager.h | 2 +- td/telegram/CallManager.h | 3 +-- td/telegram/Client.cpp | 2 +- td/telegram/ClientJson.cpp | 1 + td/telegram/ClientJson.h | 2 +- td/telegram/ConfigManager.cpp | 3 ++- td/telegram/ConfigShared.h | 2 +- td/telegram/ContactsManager.h | 3 ++- td/telegram/CountryInfoManager.h | 2 +- td/telegram/DialogFilter.h | 3 +-- td/telegram/DocumentsManager.h | 2 +- td/telegram/FileReferenceManager.h | 3 +-- td/telegram/Global.h | 2 +- td/telegram/GroupCallManager.h | 5 ++--- td/telegram/InlineQueriesManager.h | 2 +- td/telegram/LanguagePackManager.cpp | 20 ++++++-------------- td/telegram/LanguagePackManager.h | 16 ++++++---------- td/telegram/MessageReaction.h | 2 +- td/telegram/MessagesManager.cpp | 7 ++++--- td/telegram/MessagesManager.h | 27 +++++++++++---------------- td/telegram/NotificationManager.cpp | 1 - td/telegram/NotificationManager.h | 2 +- td/telegram/PollManager.cpp | 1 - td/telegram/PollManager.h | 2 +- td/telegram/QueryCombiner.h | 2 +- td/telegram/SecureManager.h | 2 +- td/telegram/SequenceDispatcher.h | 2 +- td/telegram/SponsoredMessageManager.h | 3 +-- td/telegram/StickersManager.cpp | 1 + td/telegram/StickersManager.h | 2 +- td/telegram/Td.h | 2 +- td/telegram/VideoNotesManager.h | 1 - td/telegram/VideosManager.h | 1 - td/telegram/VoiceNotesManager.h | 1 - td/telegram/WebPageBlock.h | 3 +-- td/telegram/WebPagesManager.h | 5 ++--- td/telegram/cli.cpp | 2 +- td/telegram/files/FileManager.h | 2 +- td/telegram/files/FileStats.h | 2 +- td/telegram/files/FileStatsWorker.cpp | 2 +- td/telegram/net/ConnectionCreator.h | 2 +- td/telegram/net/Session.h | 2 +- tddb/td/db/BinlogKeyValue.h | 3 ++- tddb/td/db/KeyValueSyncInterface.h | 3 +-- tddb/td/db/SeqKeyValue.h | 3 +-- tddb/td/db/SqliteKeyValue.h | 3 +-- tddb/td/db/SqliteKeyValueAsync.h | 2 +- tddb/td/db/TQueue.cpp | 2 +- tddb/td/db/TsSeqKeyValue.h | 2 +- tdutils/test/HashSet.cpp | 2 +- test/db.cpp | 2 +- 53 files changed, 75 insertions(+), 103 deletions(-) diff --git a/td/telegram/AnimationsManager.h b/td/telegram/AnimationsManager.h index 01ffb3642..2c7b40c01 100644 --- a/td/telegram/AnimationsManager.h +++ b/td/telegram/AnimationsManager.h @@ -18,9 +18,8 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" -#include "td/utils/Status.h" - #include "td/utils/FlatHashMap.h" +#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/AudiosManager.h b/td/telegram/AudiosManager.h index 886e4a499..8d158acb9 100644 --- a/td/telegram/AudiosManager.h +++ b/td/telegram/AudiosManager.h @@ -14,7 +14,6 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" - #include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/BackgroundManager.h b/td/telegram/BackgroundManager.h index 5b6e2b0e1..9142f5e75 100644 --- a/td/telegram/BackgroundManager.h +++ b/td/telegram/BackgroundManager.h @@ -19,10 +19,10 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/CallManager.h b/td/telegram/CallManager.h index b4c5b0474..98923f3c6 100644 --- a/td/telegram/CallManager.h +++ b/td/telegram/CallManager.h @@ -13,11 +13,10 @@ #include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" - +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/Client.cpp b/td/telegram/Client.cpp index f7409531f..6a792f605 100644 --- a/td/telegram/Client.cpp +++ b/td/telegram/Client.cpp @@ -16,6 +16,7 @@ #include "td/utils/common.h" #include "td/utils/crypto.h" #include "td/utils/ExitGuard.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/MpscPollableQueue.h" @@ -29,7 +30,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/ClientJson.cpp b/td/telegram/ClientJson.cpp index bc586dde4..d66741383 100644 --- a/td/telegram/ClientJson.cpp +++ b/td/telegram/ClientJson.cpp @@ -10,6 +10,7 @@ #include "td/telegram/td_api_json.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/JsonBuilder.h" #include "td/utils/port/thread_local.h" #include "td/utils/SliceBuilder.h" diff --git a/td/telegram/ClientJson.h b/td/telegram/ClientJson.h index bf613c511..1f86ed05a 100644 --- a/td/telegram/ClientJson.h +++ b/td/telegram/ClientJson.h @@ -8,13 +8,13 @@ #include "td/telegram/Client.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include #include #include #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 425bdc2ff..4aa292354 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -48,6 +48,7 @@ #include "td/utils/common.h" #include "td/utils/crypto.h" #include "td/utils/emoji.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/format.h" #include "td/utils/JsonBuilder.h" #include "td/utils/logging.h" @@ -61,9 +62,9 @@ #include "td/utils/tl_parsers.h" #include "td/utils/UInt.h" +#include "td/utils/FlatHashMap.h" #include #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/ConfigShared.h b/td/telegram/ConfigShared.h index fb2740d73..7352e9c03 100644 --- a/td/telegram/ConfigShared.h +++ b/td/telegram/ConfigShared.h @@ -9,10 +9,10 @@ #include "td/db/KeyValueSyncInterface.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index ec5eed4cd..35c31f980 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -40,6 +40,7 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Hints.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" @@ -47,7 +48,7 @@ #include #include -#include "td/utils/FlatHashMap.h" +#include #include #include diff --git a/td/telegram/CountryInfoManager.h b/td/telegram/CountryInfoManager.h index 1c08db1a3..270caebad 100644 --- a/td/telegram/CountryInfoManager.h +++ b/td/telegram/CountryInfoManager.h @@ -13,11 +13,11 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/DialogFilter.h b/td/telegram/DialogFilter.h index 0a639a7c1..73146c37f 100644 --- a/td/telegram/DialogFilter.h +++ b/td/telegram/DialogFilter.h @@ -12,11 +12,10 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" -#include "td/utils/FlatHashMap.h" - namespace td { class DialogFilter { diff --git a/td/telegram/DocumentsManager.h b/td/telegram/DocumentsManager.h index dfc5dc510..e711835df 100644 --- a/td/telegram/DocumentsManager.h +++ b/td/telegram/DocumentsManager.h @@ -18,8 +18,8 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" - #include "td/utils/FlatHashMap.h" + #include namespace td { diff --git a/td/telegram/FileReferenceManager.h b/td/telegram/FileReferenceManager.h index fce41caf7..a103842d6 100644 --- a/td/telegram/FileReferenceManager.h +++ b/td/telegram/FileReferenceManager.h @@ -20,13 +20,12 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/Variant.h" -#include "td/utils/FlatHashMap.h" - namespace td { class Td; diff --git a/td/telegram/Global.h b/td/telegram/Global.h index 6e949ce94..0beb72821 100644 --- a/td/telegram/Global.h +++ b/td/telegram/Global.h @@ -18,6 +18,7 @@ #include "td/actor/SchedulerLocalStorage.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" @@ -26,7 +27,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" namespace td { class AnimationsManager; diff --git a/td/telegram/GroupCallManager.h b/td/telegram/GroupCallManager.h index 736ba6272..81d4ce0c4 100644 --- a/td/telegram/GroupCallManager.h +++ b/td/telegram/GroupCallManager.h @@ -21,9 +21,9 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" -#include "td/utils/FlatHashMap.h" #include namespace td { @@ -385,8 +385,7 @@ class GroupCallManager final : public Actor { string pending_group_call_join_params_; - FlatHashMap, InputGroupCallIdHash> - group_call_participants_; + FlatHashMap, InputGroupCallIdHash> group_call_participants_; FlatHashMap, DialogIdHash> participant_id_to_group_call_id_; FlatHashMap, GroupCallIdHash> group_call_recent_speakers_; diff --git a/td/telegram/InlineQueriesManager.h b/td/telegram/InlineQueriesManager.h index 89e22dcf9..02dae8aa0 100644 --- a/td/telegram/InlineQueriesManager.h +++ b/td/telegram/InlineQueriesManager.h @@ -23,9 +23,9 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/LanguagePackManager.cpp b/td/telegram/LanguagePackManager.cpp index ceb754249..d41321a7f 100644 --- a/td/telegram/LanguagePackManager.cpp +++ b/td/telegram/LanguagePackManager.cpp @@ -771,25 +771,17 @@ td_api::object_ptr LanguagePackManager::get_lan } td_api::object_ptr LanguagePackManager::get_language_pack_string_object( - const std::pair &str) { - return td_api::make_object(str.first, get_language_pack_string_value_object(str.second)); -} -td_api::object_ptr LanguagePackManager::get_language_pack_string_object( - const string &a, const string &b) { - return td_api::make_object(a, get_language_pack_string_value_object(b)); + const string &key, const string &value) { + return td_api::make_object(key, get_language_pack_string_value_object(value)); } td_api::object_ptr LanguagePackManager::get_language_pack_string_object( - const std::pair &str) { - return td_api::make_object(str.first, get_language_pack_string_value_object(str.second)); -} -td_api::object_ptr LanguagePackManager::get_language_pack_string_object( - const string &a, const PluralizedString &b) { - return td_api::make_object(a, get_language_pack_string_value_object(b)); + const string &key, const PluralizedString &value) { + return td_api::make_object(key, get_language_pack_string_value_object(value)); } -td_api::object_ptr LanguagePackManager::get_language_pack_string_object(const string &str) { - return td_api::make_object(str, get_language_pack_string_value_object()); +td_api::object_ptr LanguagePackManager::get_language_pack_string_object(const string &key) { + return td_api::make_object(key, get_language_pack_string_value_object()); } td_api::object_ptr LanguagePackManager::get_language_pack_string_value_object( diff --git a/td/telegram/LanguagePackManager.h b/td/telegram/LanguagePackManager.h index 540469e66..a0022b220 100644 --- a/td/telegram/LanguagePackManager.h +++ b/td/telegram/LanguagePackManager.h @@ -15,11 +15,11 @@ #include "td/utils/common.h" #include "td/utils/Container.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" #include namespace td { @@ -125,15 +125,11 @@ class LanguagePackManager final : public NetQueryCallback { const PluralizedString &value); static td_api::object_ptr get_language_pack_string_value_object(); - static td_api::object_ptr get_language_pack_string_object( - const std::pair &str); - static td_api::object_ptr get_language_pack_string_object( - const string &, const string &); - static td_api::object_ptr get_language_pack_string_object( - const std::pair &str); - static td_api::object_ptr get_language_pack_string_object( - const string &, const PluralizedString &); - static td_api::object_ptr get_language_pack_string_object(const string &str); + static td_api::object_ptr get_language_pack_string_object(const string &key, + const string &value); + static td_api::object_ptr get_language_pack_string_object(const string &key, + const PluralizedString &value); + static td_api::object_ptr get_language_pack_string_object(const string &key); static td_api::object_ptr get_language_pack_string_value_object( const Language *language, const string &key); diff --git a/td/telegram/MessageReaction.h b/td/telegram/MessageReaction.h index 14300a034..2b59a6479 100644 --- a/td/telegram/MessageReaction.h +++ b/td/telegram/MessageReaction.h @@ -17,9 +17,9 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/StringBuilder.h" -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 9c0dbbe7d..de1bb80fb 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -1,4 +1,6 @@ // +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022 +// // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -81,7 +83,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include #include @@ -36572,8 +36573,8 @@ bool MessagesManager::set_dialog_order(Dialog *d, int64 new_order, bool need_sen } void MessagesManager::update_dialog_lists( - Dialog *d, FlatHashMap &&old_positions, - bool need_send_update, bool is_loaded_from_database, const char *source) { + Dialog *d, FlatHashMap &&old_positions, bool need_send_update, + bool is_loaded_from_database, const char *source) { if (td_->auth_manager_->is_bot()) { return; } diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 1d3ed903e..ad7f231a0 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -66,6 +66,7 @@ #include "td/utils/buffer.h" #include "td/utils/ChangesProcessor.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Heap.h" #include "td/utils/Hints.h" #include "td/utils/logging.h" @@ -73,14 +74,11 @@ #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" -#include "td/utils/FlatHashMap.h" - #include #include #include #include #include -#include "td/utils/FlatHashMap.h" #include #include @@ -1326,11 +1324,11 @@ class MessagesManager final : public Actor { bool suffix_load_done_ = false; bool suffix_load_has_query_ = false; - int32 pts = 0; // for channels only - int32 pending_read_channel_inbox_pts = 0; // for channels only - int32 pending_read_channel_inbox_server_unread_count = 0; // for channels only - MessageId pending_read_channel_inbox_max_message_id; // for channels only - FlatHashMap random_id_to_message_id; // for secret chats only + int32 pts = 0; // for channels only + int32 pending_read_channel_inbox_pts = 0; // for channels only + int32 pending_read_channel_inbox_server_unread_count = 0; // for channels only + MessageId pending_read_channel_inbox_max_message_id; // for channels only + FlatHashMap random_id_to_message_id; // for secret chats only MessageId last_assigned_message_id; // identifier of the last local or yet unsent message, assigned after // application start, used to guarantee that all assigned message identifiers @@ -3022,8 +3020,7 @@ class MessagesManager final : public Actor { bool set_dialog_order(Dialog *d, int64 new_order, bool need_send_update, bool is_loaded_from_database, const char *source); - void update_dialog_lists(Dialog *d, - FlatHashMap &&old_positions, + void update_dialog_lists(Dialog *d, FlatHashMap &&old_positions, bool need_send_update, bool is_loaded_from_database, const char *source); void update_last_dialog_date(FolderId folder_id); @@ -3326,10 +3323,9 @@ class MessagesManager final : public Actor { FlatHashMap being_sent_messages_; // message_random_id -> message - FlatHashMap - update_message_ids_; // new_message_id -> temporary_id + FlatHashMap update_message_ids_; // new_message_id -> temporary_id FlatHashMap, - DialogIdHash> + DialogIdHash> update_scheduled_message_ids_; // new_message_id -> temporary_id const char *debug_add_message_to_dialog_fail_reason_ = ""; @@ -3444,7 +3440,7 @@ class MessagesManager final : public Actor { FlatHashMap> found_dialog_message_calendars_; FlatHashMap>> - found_dialog_messages_; // random_id -> [total_count, [message_id]...] + found_dialog_messages_; // random_id -> [total_count, [message_id]...] FlatHashMap found_dialog_messages_dialog_id_; // random_id -> dialog_id FlatHashMap>> found_messages_; // random_id -> [total_count, [full_message_id]...] @@ -3578,8 +3574,7 @@ class MessagesManager final : public Actor { ChangesProcessor> pending_secret_messages_; - FlatHashMap, DialogIdHash> - pending_add_dialog_last_database_message_dependent_dialogs_; + FlatHashMap, DialogIdHash> pending_add_dialog_last_database_message_dependent_dialogs_; FlatHashMap>, DialogIdHash> pending_add_dialog_last_database_message_; // dialog -> dependency counter + message diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 4af3601cf..c6e866a2b 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -61,7 +61,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/NotificationManager.h b/td/telegram/NotificationManager.h index e173058c3..188c595c1 100644 --- a/td/telegram/NotificationManager.h +++ b/td/telegram/NotificationManager.h @@ -24,6 +24,7 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" @@ -31,7 +32,6 @@ #include #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 33d06c076..ed5f27616 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -44,7 +44,6 @@ #include #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/PollManager.h b/td/telegram/PollManager.h index 37b24b0f7..2a8e3dd30 100644 --- a/td/telegram/PollManager.h +++ b/td/telegram/PollManager.h @@ -21,9 +21,9 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/QueryCombiner.h b/td/telegram/QueryCombiner.h index 1fb6a9b98..ae9b1c99a 100644 --- a/td/telegram/QueryCombiner.h +++ b/td/telegram/QueryCombiner.h @@ -10,11 +10,11 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/SecureManager.h b/td/telegram/SecureManager.h index d8ff0d2e9..35409a836 100644 --- a/td/telegram/SecureManager.h +++ b/td/telegram/SecureManager.h @@ -18,10 +18,10 @@ #include "td/utils/common.h" #include "td/utils/Container.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/SequenceDispatcher.h b/td/telegram/SequenceDispatcher.h index 57833996b..e4e7fa934 100644 --- a/td/telegram/SequenceDispatcher.h +++ b/td/telegram/SequenceDispatcher.h @@ -11,11 +11,11 @@ #include "td/actor/actor.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Random.h" #include "td/utils/Slice.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/SponsoredMessageManager.h b/td/telegram/SponsoredMessageManager.h index a91655a36..a35adecbd 100644 --- a/td/telegram/SponsoredMessageManager.h +++ b/td/telegram/SponsoredMessageManager.h @@ -16,9 +16,8 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" -#include "td/utils/Status.h" - #include "td/utils/FlatHashMap.h" +#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 733c7cdbe..c824cd578 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -46,6 +46,7 @@ #include "td/utils/algorithm.h" #include "td/utils/base64.h" #include "td/utils/emoji.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/format.h" #include "td/utils/JsonBuilder.h" #include "td/utils/logging.h" diff --git a/td/telegram/StickersManager.h b/td/telegram/StickersManager.h index c930be70d..1f7d551ad 100644 --- a/td/telegram/StickersManager.h +++ b/td/telegram/StickersManager.h @@ -25,13 +25,13 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Hints.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 8f21f8361..dba3d1238 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -26,12 +26,12 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" #include "td/utils/Container.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/VideoNotesManager.h b/td/telegram/VideoNotesManager.h index e35d903b9..3693bff7f 100644 --- a/td/telegram/VideoNotesManager.h +++ b/td/telegram/VideoNotesManager.h @@ -14,7 +14,6 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" - #include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/VideosManager.h b/td/telegram/VideosManager.h index c876bf92c..d519a3066 100644 --- a/td/telegram/VideosManager.h +++ b/td/telegram/VideosManager.h @@ -14,7 +14,6 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" - #include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/VoiceNotesManager.h b/td/telegram/VoiceNotesManager.h index 41c942979..97ce31595 100644 --- a/td/telegram/VoiceNotesManager.h +++ b/td/telegram/VoiceNotesManager.h @@ -12,7 +12,6 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" - #include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/WebPageBlock.h b/td/telegram/WebPageBlock.h index f1bc8c19c..0a6b548e4 100644 --- a/td/telegram/WebPageBlock.h +++ b/td/telegram/WebPageBlock.h @@ -13,9 +13,8 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" -#include "td/utils/Slice.h" - #include "td/utils/FlatHashMap.h" +#include "td/utils/Slice.h" namespace td { diff --git a/td/telegram/WebPagesManager.h b/td/telegram/WebPagesManager.h index 456bd93b1..59d51e90b 100644 --- a/td/telegram/WebPagesManager.h +++ b/td/telegram/WebPagesManager.h @@ -20,9 +20,9 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Status.h" -#include "td/utils/FlatHashMap.h" #include #include @@ -192,8 +192,7 @@ class WebPagesManager final : public Actor { FlatHashMap, WebPageIdHash> web_page_messages_; - FlatHashMap>>, WebPageIdHash> - pending_get_web_pages_; + FlatHashMap>>, WebPageIdHash> pending_get_web_pages_; int64 get_web_page_preview_request_id_ = 1; FlatHashMap got_web_page_previews_; diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 1ebcc7bb0..0bf665239 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -25,6 +25,7 @@ #include "td/utils/ExitGuard.h" #include "td/utils/FileLog.h" #include "td/utils/filesystem.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/format.h" #include "td/utils/JsonBuilder.h" #include "td/utils/logging.h" @@ -63,7 +64,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/files/FileManager.h b/td/telegram/files/FileManager.h index d68b97a37..b57b390e2 100644 --- a/td/telegram/files/FileManager.h +++ b/td/telegram/files/FileManager.h @@ -27,6 +27,7 @@ #include "td/utils/common.h" #include "td/utils/Container.h" #include "td/utils/Enumerator.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/optional.h" #include "td/utils/Slice.h" @@ -36,7 +37,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/td/telegram/files/FileStats.h b/td/telegram/files/FileStats.h index ddbbd706c..7e0482ad7 100644 --- a/td/telegram/files/FileStats.h +++ b/td/telegram/files/FileStats.h @@ -10,11 +10,11 @@ #include "td/telegram/files/FileType.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/StringBuilder.h" #include "td/utils/tl_helpers.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/td/telegram/files/FileStatsWorker.cpp b/td/telegram/files/FileStatsWorker.cpp index 78b9091ab..2bc562727 100644 --- a/td/telegram/files/FileStatsWorker.cpp +++ b/td/telegram/files/FileStatsWorker.cpp @@ -19,6 +19,7 @@ #include "td/db/SqliteKeyValue.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/format.h" #include "td/utils/logging.h" #include "td/utils/misc.h" @@ -31,7 +32,6 @@ #include "td/utils/tl_parsers.h" #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/net/ConnectionCreator.h b/td/telegram/net/ConnectionCreator.h index 2818b992f..16082dd13 100644 --- a/td/telegram/net/ConnectionCreator.h +++ b/td/telegram/net/ConnectionCreator.h @@ -26,6 +26,7 @@ #include "td/utils/BufferedFd.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/FloodControlStrict.h" #include "td/utils/logging.h" #include "td/utils/port/IPAddress.h" @@ -37,7 +38,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/td/telegram/net/Session.h b/td/telegram/net/Session.h index e1be324d9..b3dea1866 100644 --- a/td/telegram/net/Session.h +++ b/td/telegram/net/Session.h @@ -22,6 +22,7 @@ #include "td/utils/buffer.h" #include "td/utils/CancellationToken.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/List.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" @@ -32,7 +33,6 @@ #include #include #include -#include "td/utils/FlatHashMap.h" #include #include diff --git a/tddb/td/db/BinlogKeyValue.h b/tddb/td/db/BinlogKeyValue.h index 5cd6fe3cc..8aea80f58 100644 --- a/tddb/td/db/BinlogKeyValue.h +++ b/tddb/td/db/BinlogKeyValue.h @@ -15,6 +15,7 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/port/RwMutex.h" @@ -25,7 +26,7 @@ #include "td/utils/tl_storers.h" #include -#include "td/utils/FlatHashMap.h" +#include #include namespace td { diff --git a/tddb/td/db/KeyValueSyncInterface.h b/tddb/td/db/KeyValueSyncInterface.h index e4a144796..197536ccc 100644 --- a/tddb/td/db/KeyValueSyncInterface.h +++ b/tddb/td/db/KeyValueSyncInterface.h @@ -9,9 +9,8 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" -#include "td/utils/Slice.h" - #include "td/utils/FlatHashMap.h" +#include "td/utils/Slice.h" namespace td { diff --git a/tddb/td/db/SeqKeyValue.h b/tddb/td/db/SeqKeyValue.h index 2bfd245df..ef05d178c 100644 --- a/tddb/td/db/SeqKeyValue.h +++ b/tddb/td/db/SeqKeyValue.h @@ -6,9 +6,8 @@ // #pragma once -#include "td/utils/Slice.h" - #include "td/utils/FlatHashMap.h" +#include "td/utils/Slice.h" namespace td { diff --git a/tddb/td/db/SqliteKeyValue.h b/tddb/td/db/SqliteKeyValue.h index e3fa3f15f..94a0f4d00 100644 --- a/tddb/td/db/SqliteKeyValue.h +++ b/tddb/td/db/SqliteKeyValue.h @@ -9,12 +9,11 @@ #include "td/db/SqliteDb.h" #include "td/db/SqliteStatement.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Slice.h" #include "td/utils/SliceBuilder.h" #include "td/utils/Status.h" -#include "td/utils/FlatHashMap.h" - namespace td { class SqliteKeyValue { diff --git a/tddb/td/db/SqliteKeyValueAsync.h b/tddb/td/db/SqliteKeyValueAsync.h index 4367a16bb..530b3f1e0 100644 --- a/tddb/td/db/SqliteKeyValueAsync.h +++ b/tddb/td/db/SqliteKeyValueAsync.h @@ -11,9 +11,9 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/tddb/td/db/TQueue.cpp b/tddb/td/db/TQueue.cpp index d7c07a317..ef0012cfb 100644 --- a/tddb/td/db/TQueue.cpp +++ b/tddb/td/db/TQueue.cpp @@ -11,6 +11,7 @@ #include "td/db/binlog/BinlogHelper.h" #include "td/db/binlog/BinlogInterface.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/misc.h" #include "td/utils/Random.h" #include "td/utils/StorerBase.h" @@ -19,7 +20,6 @@ #include "td/utils/tl_storers.h" #include -#include "td/utils/FlatHashMap.h" namespace td { diff --git a/tddb/td/db/TsSeqKeyValue.h b/tddb/td/db/TsSeqKeyValue.h index 09d50aeee..aea95770d 100644 --- a/tddb/td/db/TsSeqKeyValue.h +++ b/tddb/td/db/TsSeqKeyValue.h @@ -8,10 +8,10 @@ #include "td/db/SeqKeyValue.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/port/RwMutex.h" #include "td/utils/Slice.h" -#include "td/utils/FlatHashMap.h" #include namespace td { diff --git a/tdutils/test/HashSet.cpp b/tdutils/test/HashSet.cpp index f8572b2e4..2859f4019 100644 --- a/tdutils/test/HashSet.cpp +++ b/tdutils/test/HashSet.cpp @@ -1,5 +1,5 @@ -#include "td/utils/tests.h" #include "td/utils/FlatHashMap.h" +#include "td/utils/tests.h" #include #include diff --git a/test/db.cpp b/test/db.cpp index 5252012e0..7dd80fbe0 100644 --- a/test/db.cpp +++ b/test/db.cpp @@ -23,6 +23,7 @@ #include "td/utils/base64.h" #include "td/utils/common.h" #include "td/utils/filesystem.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/logging.h" #include "td/utils/port/FileFd.h" #include "td/utils/port/thread.h" @@ -34,7 +35,6 @@ #include #include #include -#include template static typename ContainerT::value_type &rand_elem(ContainerT &cont) {