diff --git a/benchmark/bench_actor.cpp b/benchmark/bench_actor.cpp index a9d86f10..9c050463 100644 --- a/benchmark/bench_actor.cpp +++ b/benchmark/bench_actor.cpp @@ -12,8 +12,6 @@ #include "td/utils/common.h" #include "td/utils/logging.h" -#include - #if TD_MSVC #pragma comment(linker, "/STACK:16777216") #endif @@ -104,7 +102,7 @@ class RingBench : public td::Benchmark { void run(int n) override { // first actor is on main_thread - actor_array_[0].get_actor_unsafe()->start_n = std::max(n, 100); + actor_array_[0].get_actor_unsafe()->start_n = td::max(n, 100); while (scheduler_->run_main(10)) { // empty } diff --git a/benchmark/bench_db.cpp b/benchmark/bench_db.cpp index e713adcd..27a42d09 100644 --- a/benchmark/bench_db.cpp +++ b/benchmark/bench_db.cpp @@ -13,6 +13,7 @@ #include "td/db/SqliteConnectionSafe.h" #include "td/db/SqliteDb.h" #include "td/db/SqliteKeyValueAsync.h" +#include "td/db/SqliteKeyValueSafe.h" #include "td/utils/benchmark.h" #include "td/utils/common.h" diff --git a/td/mtproto/SessionConnection.cpp b/td/mtproto/SessionConnection.cpp index c05bb568..7c7d300e 100644 --- a/td/mtproto/SessionConnection.cpp +++ b/td/mtproto/SessionConnection.cpp @@ -848,7 +848,7 @@ void SessionConnection::flush_packet() { max_delay = HTTP_MAX_DELAY; max_after = HTTP_MAX_AFTER; auto time_to_disconnect = - std::min(ping_disconnect_delay() + last_pong_at_, read_disconnect_delay() + last_read_at_) - Time::now_cached(); + min(ping_disconnect_delay() + last_pong_at_, read_disconnect_delay() + last_read_at_) - Time::now_cached(); max_wait = min(http_max_wait(), static_cast(1000 * max(0.1, time_to_disconnect - rtt()))); } else if (mode_ == Mode::Http) { max_delay = HTTP_MAX_DELAY; diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 942e87c6..4da4b19c 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -37,6 +37,7 @@ #include "td/db/binlog/BinlogEvent.h" #include "td/db/binlog/BinlogHelper.h" +#include "td/db/SqliteKeyValue.h" #include "td/db/SqliteKeyValueAsync.h" #include "td/utils/buffer.h" diff --git a/td/telegram/MessageContent.h b/td/telegram/MessageContent.h index 9e964550..db769e58 100644 --- a/td/telegram/MessageContent.h +++ b/td/telegram/MessageContent.h @@ -20,6 +20,8 @@ #include "td/telegram/UserId.h" #include "td/telegram/WebPageId.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/buffer.h" #include "td/utils/common.h" #include "td/utils/Status.h" diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 5bb14a5c..2c11b21a 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -53,6 +53,7 @@ #include "td/db/binlog/BinlogEvent.h" #include "td/db/binlog/BinlogHelper.h" +#include "td/db/SqliteKeyValue.h" #include "td/db/SqliteKeyValueAsync.h" #include "td/utils/format.h" @@ -11120,7 +11121,7 @@ void MessagesManager::load_dialog_list(int32 limit, Promise &&promise) { if (multipromise.promise_count() != 1) { // queries have already been sent, just wait for the result if (use_database) { - load_dialog_list_limit_max_ = std::max(load_dialog_list_limit_max_, limit); + load_dialog_list_limit_max_ = max(load_dialog_list_limit_max_, limit); } return; } diff --git a/td/telegram/PollId.h b/td/telegram/PollId.h index d59108a6..25a64eed 100644 --- a/td/telegram/PollId.h +++ b/td/telegram/PollId.h @@ -8,7 +8,6 @@ #include "td/utils/common.h" #include "td/utils/StringBuilder.h" -#include "td/utils/tl_helpers.h" #include #include diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 89a96da4..0185af23 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -6,7 +6,10 @@ // #include "td/telegram/PollManager.h" +#include "td/telegram/AccessRights.h" #include "td/telegram/AuthManager.h" +#include "td/telegram/Dependencies.h" +#include "td/telegram/DialogId.h" #include "td/telegram/Global.h" #include "td/telegram/logevent/LogEvent.h" #include "td/telegram/logevent/LogEventHelper.h" @@ -31,9 +34,12 @@ #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/Random.h" +#include "td/utils/Slice.h" #include "td/utils/Status.h" +#include "td/utils/tl_helpers.h" #include +#include namespace td { @@ -491,7 +497,7 @@ void PollManager::do_set_poll_answer(PollId poll_id, FullMessageId full_message_ void PollManager::on_set_poll_answer(PollId poll_id, uint64 generation, Result &&result) { if (G()->close_flag() && result.is_error()) { - // request will be resent after restart + // request will be re-sent after restart return; } auto it = pending_answers_.find(poll_id); diff --git a/td/telegram/PollManager.h b/td/telegram/PollManager.h index 23efdda7..1a701342 100644 --- a/td/telegram/PollManager.h +++ b/td/telegram/PollManager.h @@ -17,6 +17,7 @@ #include "td/actor/Timeout.h" #include "td/utils/common.h" +#include "td/utils/Status.h" #include #include diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index 3c194132..03ce3b93 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -27,6 +27,7 @@ #include "td/telegram/net/NetQuery.h" #include "td/telegram/NotificationManager.h" #include "td/telegram/Payments.h" +#include "td/telegram/PollId.h" #include "td/telegram/PollManager.h" #include "td/telegram/PrivacyManager.h" #include "td/telegram/SecretChatId.h" diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index ff37982a..e31da6da 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -44,6 +44,7 @@ #include "td/db/binlog/BinlogEvent.h" #include "td/db/binlog/BinlogHelper.h" +#include "td/db/SqliteKeyValue.h" #include "td/db/SqliteKeyValueAsync.h" #include "td/utils/buffer.h" diff --git a/td/telegram/files/PartsManager.cpp b/td/telegram/files/PartsManager.cpp index af8a12e8..411a8043 100644 --- a/td/telegram/files/PartsManager.cpp +++ b/td/telegram/files/PartsManager.cpp @@ -323,7 +323,7 @@ int64 PartsManager::get_size_or_zero() const { int64 PartsManager::get_estimated_extra() const { auto total_estimated_extra = get_expected_size() - get_ready_size(); if (streaming_limit_ != 0) { - return std::min(streaming_limit_, total_estimated_extra); + return td::min(streaming_limit_, total_estimated_extra); } return total_estimated_extra; } diff --git a/tddb/td/db/SqliteKeyValueAsync.cpp b/tddb/td/db/SqliteKeyValueAsync.cpp index 405ae1f9..658c474a 100644 --- a/tddb/td/db/SqliteKeyValueAsync.cpp +++ b/tddb/td/db/SqliteKeyValueAsync.cpp @@ -6,6 +6,8 @@ // #include "td/db/SqliteKeyValueAsync.h" +#include "td/db/SqliteKeyValue.h" + #include "td/actor/actor.h" #include "td/utils/common.h"