Fix includes.

GitOrigin-RevId: d633dc842591cd28a03f9fba6974a171926ed229
This commit is contained in:
levlam 2019-02-22 23:15:43 +03:00
parent 075874d729
commit 58f63d36d6
13 changed files with 21 additions and 8 deletions

View File

@ -12,8 +12,6 @@
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include <algorithm>
#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
}

View File

@ -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"

View File

@ -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<int>(1000 * max(0.1, time_to_disconnect - rtt())));
} else if (mode_ == Mode::Http) {
max_delay = HTTP_MAX_DELAY;

View File

@ -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"

View File

@ -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"

View File

@ -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<Unit> &&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;
}

View File

@ -8,7 +8,6 @@
#include "td/utils/common.h"
#include "td/utils/StringBuilder.h"
#include "td/utils/tl_helpers.h"
#include <functional>
#include <type_traits>

View File

@ -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 <algorithm>
#include <limits>
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<Unit> &&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);

View File

@ -17,6 +17,7 @@
#include "td/actor/Timeout.h"
#include "td/utils/common.h"
#include "td/utils/Status.h"
#include <unordered_map>
#include <unordered_set>

View File

@ -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"

View File

@ -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"

View File

@ -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;
}

View File

@ -6,6 +6,8 @@
//
#include "td/db/SqliteKeyValueAsync.h"
#include "td/db/SqliteKeyValue.h"
#include "td/actor/actor.h"
#include "td/utils/common.h"