diff --git a/benchmark/bench_http_server_cheat.cpp b/benchmark/bench_http_server_cheat.cpp index 9492fe661..8fc5abe01 100644 --- a/benchmark/bench_http_server_cheat.cpp +++ b/benchmark/bench_http_server_cheat.cpp @@ -11,6 +11,7 @@ #include "td/actor/ConcurrentScheduler.h" #include "td/utils/buffer.h" +#include "td/utils/common.h" #include "td/utils/logging.h" #include "td/utils/port/detail/PollableFd.h" #include "td/utils/port/SocketFd.h" diff --git a/benchmark/bench_misc.cpp b/benchmark/bench_misc.cpp index f108b4b6a..9089890fb 100644 --- a/benchmark/bench_misc.cpp +++ b/benchmark/bench_misc.cpp @@ -9,7 +9,6 @@ #include "td/utils/benchmark.h" #include "td/utils/common.h" -#include "td/utils/format.h" #include "td/utils/logging.h" #include "td/utils/port/Clocks.h" #include "td/utils/port/EventFd.h" diff --git a/benchmark/rmdir.cpp b/benchmark/rmdir.cpp index 1a1a7133b..ffc51828f 100644 --- a/benchmark/rmdir.cpp +++ b/benchmark/rmdir.cpp @@ -4,6 +4,7 @@ // 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) // +#include "td/utils/common.h" #include "td/utils/logging.h" #include "td/utils/port/path.h" #include "td/utils/Slice.h" diff --git a/td/telegram/AutosaveManager.cpp b/td/telegram/AutosaveManager.cpp index 5d578841b..1c15c140d 100644 --- a/td/telegram/AutosaveManager.cpp +++ b/td/telegram/AutosaveManager.cpp @@ -6,16 +6,25 @@ // #include "td/telegram/AutosaveManager.h" +#include "td/telegram/AccessRights.h" #include "td/telegram/ContactsManager.h" #include "td/telegram/Dependencies.h" +#include "td/telegram/Global.h" +#include "td/telegram/logevent/LogEvent.h" #include "td/telegram/MessagesManager.h" #include "td/telegram/Td.h" +#include "td/telegram/TdDb.h" +#include "td/telegram/TdParameters.h" #include "td/db/SqliteKeyValueAsync.h" #include "td/utils/algorithm.h" #include "td/utils/buffer.h" +#include "td/utils/FlatHashSet.h" +#include "td/utils/logging.h" #include "td/utils/misc.h" +#include "td/utils/ScopeGuard.h" +#include "td/utils/tl_helpers.h" namespace td { @@ -287,13 +296,13 @@ void AutosaveManager::load_autosave_settings(Promiseclose_flag()) { + return fail_promises(load_settings_queries_, Global::request_aborted_error()); + } if (settings_.are_inited_) { CHECK(load_settings_queries_.empty()); return; } - if (G()->close_flag()) { - return fail_promises(load_settings_queries_, Global::request_aborted_error()); - } if (value.empty()) { LOG(INFO) << "Autosave settings aren't found in database"; return reload_autosave_settings(); diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 8a6b704fb..eda08f80e 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -44,6 +44,7 @@ #include "td/telegram/SecretChatLayer.h" #include "td/telegram/SecretChatsManager.h" #include "td/telegram/ServerMessageId.h" +#include "td/telegram/StickerPhotoSize.h" #include "td/telegram/StickersManager.h" #include "td/telegram/Td.h" #include "td/telegram/TdDb.h" diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index 4c7399f9d..fbbddf909 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -35,7 +35,6 @@ #include "td/telegram/QueryMerger.h" #include "td/telegram/RestrictionReason.h" #include "td/telegram/SecretChatId.h" -#include "td/telegram/StickerPhotoSize.h" #include "td/telegram/StickerSetId.h" #include "td/telegram/SuggestedAction.h" #include "td/telegram/td_api.h" diff --git a/td/telegram/DialogInviteLink.cpp b/td/telegram/DialogInviteLink.cpp index 8ff77699c..c0ae12afa 100644 --- a/td/telegram/DialogInviteLink.cpp +++ b/td/telegram/DialogInviteLink.cpp @@ -10,6 +10,7 @@ #include "td/telegram/LinkManager.h" #include "td/utils/logging.h" +#include "td/utils/misc.h" #include "td/utils/SliceBuilder.h" namespace td { diff --git a/td/telegram/EmojiGroup.cpp b/td/telegram/EmojiGroup.cpp index 693696af6..42c3b9c80 100644 --- a/td/telegram/EmojiGroup.cpp +++ b/td/telegram/EmojiGroup.cpp @@ -9,6 +9,7 @@ #include "td/telegram/StickersManager.h" #include "td/utils/algorithm.h" +#include "td/utils/logging.h" #include "td/utils/Time.h" namespace td { diff --git a/td/telegram/ForumTopicManager.cpp b/td/telegram/ForumTopicManager.cpp index 23277f6f5..51a9b541e 100644 --- a/td/telegram/ForumTopicManager.cpp +++ b/td/telegram/ForumTopicManager.cpp @@ -23,7 +23,6 @@ #include "td/telegram/misc.h" #include "td/telegram/NotificationManager.h" #include "td/telegram/NotificationSettingsManager.h" -#include "td/telegram/OptionManager.h" #include "td/telegram/ServerMessageId.h" #include "td/telegram/Td.h" #include "td/telegram/TdDb.h" diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index 92538f057..a7723b2c4 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -24,7 +24,6 @@ #include "td/utils/misc.h" #include "td/utils/Promise.h" #include "td/utils/SliceBuilder.h" -#include "td/utils/StackAllocator.h" #include "td/utils/StringBuilder.h" #include "td/utils/unicode.h" #include "td/utils/utf8.h" diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index c763d2068..a1d2d4f57 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -57,6 +57,7 @@ #include "td/telegram/ReplyMarkup.hpp" #include "td/telegram/SecretChatsManager.h" #include "td/telegram/SponsoredMessageManager.h" +#include "td/telegram/StickerPhotoSize.h" #include "td/telegram/StickerType.h" #include "td/telegram/Td.h" #include "td/telegram/TdDb.h" diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 91f73ffd9..94e7c0296 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -60,7 +60,6 @@ #include "td/telegram/SecretChatId.h" #include "td/telegram/SecretInputMedia.h" #include "td/telegram/ServerMessageId.h" -#include "td/telegram/StickerPhotoSize.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" diff --git a/td/telegram/QueryMerger.cpp b/td/telegram/QueryMerger.cpp index 84298e89f..850ca1ee6 100644 --- a/td/telegram/QueryMerger.cpp +++ b/td/telegram/QueryMerger.cpp @@ -7,7 +7,6 @@ #include "td/telegram/QueryMerger.h" #include "td/utils/logging.h" -#include "td/utils/Time.h" namespace td { diff --git a/td/telegram/RequestedDialogType.h b/td/telegram/RequestedDialogType.h index 7247d6aee..989598c73 100644 --- a/td/telegram/RequestedDialogType.h +++ b/td/telegram/RequestedDialogType.h @@ -12,6 +12,7 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" +#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/StickerMaskPosition.cpp b/td/telegram/StickerMaskPosition.cpp index 0e76cf807..09eef461c 100644 --- a/td/telegram/StickerMaskPosition.cpp +++ b/td/telegram/StickerMaskPosition.cpp @@ -6,8 +6,6 @@ // #include "td/telegram/StickerMaskPosition.h" -#include "td/utils/logging.h" - namespace td { static td_api::object_ptr get_mask_point_object(int32 point) { diff --git a/td/telegram/StickerMaskPosition.h b/td/telegram/StickerMaskPosition.h index 492c36e20..435141de0 100644 --- a/td/telegram/StickerMaskPosition.h +++ b/td/telegram/StickerMaskPosition.h @@ -10,7 +10,6 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" -#include "td/utils/Status.h" #include "td/utils/StringBuilder.h" namespace td { diff --git a/td/telegram/SuggestedAction.cpp b/td/telegram/SuggestedAction.cpp index 220a297ee..dc35bd856 100644 --- a/td/telegram/SuggestedAction.cpp +++ b/td/telegram/SuggestedAction.cpp @@ -15,6 +15,7 @@ #include "td/actor/actor.h" #include "td/utils/algorithm.h" +#include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/Status.h" diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 191aba646..5a352ee79 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -115,6 +115,7 @@ #include "td/telegram/SentEmailCode.h" #include "td/telegram/SponsoredMessageManager.h" #include "td/telegram/StateManager.h" +#include "td/telegram/StickerFormat.h" #include "td/telegram/StickerSetId.h" #include "td/telegram/StickersManager.h" #include "td/telegram/StickerType.h" diff --git a/td/telegram/TranslationManager.cpp b/td/telegram/TranslationManager.cpp index 87fab79a9..fb831c413 100644 --- a/td/telegram/TranslationManager.cpp +++ b/td/telegram/TranslationManager.cpp @@ -13,6 +13,7 @@ #include "td/utils/algorithm.h" #include "td/utils/buffer.h" +#include "td/utils/logging.h" #include "td/utils/Status.h" namespace td { diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index 169009cd7..d92061220 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -56,6 +56,7 @@ #include "td/telegram/Td.h" #include "td/telegram/td_api.h" #include "td/telegram/TdDb.h" +#include "td/telegram/TdParameters.h" #include "td/telegram/telegram_api.hpp" #include "td/telegram/ThemeManager.h" #include "td/telegram/Usernames.h" diff --git a/td/telegram/WebApp.cpp b/td/telegram/WebApp.cpp index a0bf27666..835b4f142 100644 --- a/td/telegram/WebApp.cpp +++ b/td/telegram/WebApp.cpp @@ -9,7 +9,6 @@ #include "td/telegram/AnimationsManager.h" #include "td/telegram/Document.h" #include "td/telegram/DocumentsManager.h" -#include "td/telegram/misc.h" #include "td/telegram/Photo.h" #include "td/telegram/Td.h" diff --git a/td/telegram/WebApp.h b/td/telegram/WebApp.h index 182ad4eb9..d6385a24f 100644 --- a/td/telegram/WebApp.h +++ b/td/telegram/WebApp.h @@ -13,7 +13,6 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" -#include "td/utils/Status.h" #include "td/utils/StringBuilder.h" namespace td { diff --git a/td/telegram/WebApp.hpp b/td/telegram/WebApp.hpp index f386558c9..6285130d7 100644 --- a/td/telegram/WebApp.hpp +++ b/td/telegram/WebApp.hpp @@ -8,10 +8,10 @@ #include "td/telegram/WebApp.h" +#include "td/telegram/AnimationsManager.h" #include "td/telegram/AnimationsManager.hpp" #include "td/telegram/Photo.hpp" #include "td/telegram/Td.h" -#include "td/telegram/Version.h" #include "td/utils/tl_helpers.h" diff --git a/td/telegram/net/NetQueryCreator.cpp b/td/telegram/net/NetQueryCreator.cpp index 57837e0de..eba7a3092 100644 --- a/td/telegram/net/NetQueryCreator.cpp +++ b/td/telegram/net/NetQueryCreator.cpp @@ -15,7 +15,6 @@ #include "td/utils/format.h" #include "td/utils/Gzip.h" #include "td/utils/logging.h" -#include "td/utils/Slice.h" #include "td/utils/Storer.h" namespace td { diff --git a/tdutils/test/HttpUrl.cpp b/tdutils/test/HttpUrl.cpp index 9c3807d61..6d97c0877 100644 --- a/tdutils/test/HttpUrl.cpp +++ b/tdutils/test/HttpUrl.cpp @@ -8,6 +8,7 @@ #include "td/utils/HttpUrl.h" #include "td/utils/misc.h" #include "td/utils/Slice.h" +#include "td/utils/SliceBuilder.h" #include "td/utils/StringBuilder.h" #include "td/utils/tests.h" diff --git a/tdutils/test/emoji.cpp b/tdutils/test/emoji.cpp index de4dabde4..47764e638 100644 --- a/tdutils/test/emoji.cpp +++ b/tdutils/test/emoji.cpp @@ -4,6 +4,7 @@ // 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) // +#include "td/utils/common.h" #include "td/utils/emoji.h" #include "td/utils/tests.h" diff --git a/tdutils/test/hashset_benchmark.cpp b/tdutils/test/hashset_benchmark.cpp index 026211d12..dbfcaa992 100644 --- a/tdutils/test/hashset_benchmark.cpp +++ b/tdutils/test/hashset_benchmark.cpp @@ -17,6 +17,7 @@ #include "td/utils/Slice.h" #include "td/utils/Span.h" #include "td/utils/StringBuilder.h" +#include "td/utils/tests.h" #include "td/utils/Time.h" #include "td/utils/VectorQueue.h" diff --git a/tdutils/test/json.cpp b/tdutils/test/json.cpp index 68ad971e1..8b42751a3 100644 --- a/tdutils/test/json.cpp +++ b/tdutils/test/json.cpp @@ -4,6 +4,7 @@ // 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) // +#include "td/utils/common.h" #include "td/utils/JsonBuilder.h" #include "td/utils/logging.h" #include "td/utils/Slice.h" diff --git a/tdutils/test/port.cpp b/tdutils/test/port.cpp index 6701efdbc..1c870f212 100644 --- a/tdutils/test/port.cpp +++ b/tdutils/test/port.cpp @@ -14,6 +14,7 @@ #include "td/utils/port/path.h" #include "td/utils/port/signals.h" #include "td/utils/port/sleep.h" +#include "td/utils/port/Stat.h" #include "td/utils/port/thread.h" #include "td/utils/port/thread_local.h" #include "td/utils/Random.h" diff --git a/tdutils/test/variant.cpp b/tdutils/test/variant.cpp index 5fb9ca9bd..a05ff24a2 100644 --- a/tdutils/test/variant.cpp +++ b/tdutils/test/variant.cpp @@ -4,6 +4,7 @@ // 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) // +#include "td/utils/common.h" #include "td/utils/Slice.h" #include "td/utils/StringBuilder.h" #include "td/utils/tests.h" diff --git a/test/country_info.cpp b/test/country_info.cpp index 4adb0689c..0a9e3c26b 100644 --- a/test/country_info.cpp +++ b/test/country_info.cpp @@ -7,6 +7,7 @@ #include "td/telegram/CountryInfoManager.h" #include "td/utils/common.h" +#include "td/utils/logging.h" #include "td/utils/tests.h" static void check_phone_number_info(td::string phone_number_prefix, const td::string &country_code, @@ -20,8 +21,10 @@ static void check_phone_number_info(td::string phone_number_prefix, const td::st CHECK(result->country_->country_code_ == country_code); } CHECK(result->country_calling_code_ == calling_code); - // LOG(ERROR) << phone_number_prefix << ' ' << result->formatted_phone_number_ << ' ' << formatted_phone_number; - CHECK(result->formatted_phone_number_ == formatted_phone_number); + if (result->formatted_phone_number_ != formatted_phone_number) { + LOG(ERROR) << phone_number_prefix << ' ' << result->formatted_phone_number_ << ' ' << formatted_phone_number; + CHECK(result->formatted_phone_number_ == formatted_phone_number); + } CHECK(result->is_anonymous_ == is_anonymous); } diff --git a/test/db.cpp b/test/db.cpp index dc370b37f..ffbd78ba1 100644 --- a/test/db.cpp +++ b/test/db.cpp @@ -30,6 +30,7 @@ #include "td/utils/Random.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" +#include "td/utils/StringBuilder.h" #include "td/utils/tests.h" #include diff --git a/test/query_merger.cpp b/test/query_merger.cpp index f3a0acc6b..becac44e6 100644 --- a/test/query_merger.cpp +++ b/test/query_merger.cpp @@ -12,7 +12,10 @@ #include "td/utils/common.h" #include "td/utils/FlatHashSet.h" +#include "td/utils/logging.h" +#include "td/utils/Promise.h" #include "td/utils/Random.h" +#include "td/utils/Status.h" #include "td/utils/tests.h" #include diff --git a/test/secure_storage.cpp b/test/secure_storage.cpp index e2bdfc8be..2126054f8 100644 --- a/test/secure_storage.cpp +++ b/test/secure_storage.cpp @@ -7,6 +7,7 @@ #include "td/telegram/SecureStorage.h" #include "td/utils/buffer.h" +#include "td/utils/common.h" #include "td/utils/filesystem.h" #include "td/utils/port/path.h" #include "td/utils/SliceBuilder.h" diff --git a/test/string_cleaning.cpp b/test/string_cleaning.cpp index 7a3cd03cc..c597d7616 100644 --- a/test/string_cleaning.cpp +++ b/test/string_cleaning.cpp @@ -6,6 +6,7 @@ // #include "td/telegram/misc.h" +#include "td/utils/common.h" #include "td/utils/Slice.h" #include "td/utils/tests.h"