Minor fixes.

GitOrigin-RevId: 0c678ad195683947355b63af5aff49875312b4a3
This commit is contained in:
levlam 2019-12-23 20:48:30 +03:00
parent 53ce59d00a
commit adb10460b2
12 changed files with 11 additions and 7 deletions

View File

@ -23,7 +23,6 @@
#include "td/telegram/Td.h"
#include "td/telegram/TdDb.h"
#include "td/telegram/TopDialogManager.h"
#include "td/telegram/UniqueId.h"
#include "td/telegram/UpdatesManager.h"
#include "td/actor/PromiseFuture.h"
@ -31,6 +30,7 @@
#include "td/utils/base64.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/ScopeGuard.h"
#include "td/utils/Slice.h"
#include "td/utils/Time.h"
@ -488,7 +488,7 @@ void AuthManager::on_request_qr_code_result(NetQueryPtr &result, bool is_import)
if (query_id_ != 0) {
on_query_error(std::move(status));
} else {
login_code_retry_delay_ = td::clamp(2 * login_code_retry_delay_, 1, 60);
login_code_retry_delay_ = clamp(2 * login_code_retry_delay_, 1, 60);
set_login_token_expires_at(Time::now() + login_code_retry_delay_);
}
}
@ -574,7 +574,7 @@ void AuthManager::on_get_password_result(NetQueryPtr &result) {
}
} else if (was_qr_code_request_) {
imported_dc_id_ = -1;
login_code_retry_delay_ = td::clamp(2 * login_code_retry_delay_, 1, 60);
login_code_retry_delay_ = clamp(2 * login_code_retry_delay_, 1, 60);
set_login_token_expires_at(Time::now() + login_code_retry_delay_);
return;
} else {

View File

@ -15,7 +15,6 @@
#include "td/telegram/telegram_api.h"
#include "td/actor/actor.h"
#include "td/actor/PromiseFuture.h"
#include "td/actor/Timeout.h"
#include "td/utils/common.h"

View File

@ -7,6 +7,7 @@
#include "td/telegram/BackgroundType.h"
#include "td/utils/logging.h"
#include "td/utils/Slice.h"
namespace td {

View File

@ -57,7 +57,7 @@ struct BackgroundType {
BackgroundType(bool is_moving, const BackgroundFill &fill, int32 intensity)
: type(Type::Pattern), is_moving(is_moving), intensity(intensity), fill(fill) {
}
BackgroundType(BackgroundFill fill) : type(Type::Fill), fill(fill) {
explicit BackgroundType(BackgroundFill fill) : type(Type::Fill), fill(fill) {
}
bool is_server() const {

View File

@ -16,6 +16,7 @@
#include "td/actor/actor.h"
#include "td/actor/PromiseFuture.h"
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include "td/utils/port/IPAddress.h"
#include "td/utils/Slice.h"

View File

@ -12,6 +12,7 @@
#include "td/telegram/ContactsManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/PasswordManager.h"
#include "td/telegram/Td.h"
#include "td/telegram/UpdatesManager.h"

View File

@ -33,6 +33,7 @@
#include "td/utils/optional.h"
#include "td/utils/Slice.h"
#include "td/utils/Status.h"
#include "td/utils/StringBuilder.h"
#include <map>
#include <memory>

View File

@ -18,7 +18,6 @@
#include "td/telegram/telegram_api.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"

View File

@ -18,6 +18,7 @@
#include "td/telegram/Global.h"
#include "td/telegram/Td.h"
#include "td/telegram/TdDb.h"
#include "td/telegram/telegram_api.h"
#include "td/utils/common.h"
#include "td/utils/format.h"

View File

@ -9,6 +9,7 @@
#include "td/actor/actor.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQueryCreator.h"
#include "td/telegram/net/NetQueryDispatcher.h"

View File

@ -11,7 +11,6 @@
#include "td/utils/Slice.h"
#include "td/utils/StringBuilder.h"
#include <tuple>
#include <utility>
REGISTER_TESTS(json)

View File

@ -9,6 +9,7 @@
#include "td/utils/common.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/Slice.h"
#include "td/utils/tests.h"
#include "td/utils/utf8.h"