Minor improvements.

This commit is contained in:
levlam 2022-08-18 23:31:14 +03:00
parent af8042dc61
commit 515a9cfb48
5 changed files with 5 additions and 7 deletions

View File

@ -445,7 +445,7 @@ void AnimationsManager::on_update_saved_animations_limit() {
if (G()->close_flag()) {
return;
}
int32 saved_animations_limit =
auto saved_animations_limit =
narrow_cast<int32>(td_->option_manager_->get_option_integer("saved_animations_limit", 200));
if (saved_animations_limit != saved_animations_limit_) {
if (saved_animations_limit > 0) {

View File

@ -30,8 +30,6 @@ namespace td {
extern int VERBOSITY_NAME(config_recoverer);
class Global;
using SimpleConfig = tl_object_ptr<telegram_api::help_configSimple>;
struct SimpleConfigResult {
Result<SimpleConfig> r_config;

View File

@ -397,8 +397,8 @@ static string get_premium_source(const td_api::object_ptr<td_api::PremiumSource>
}
static td_api::object_ptr<td_api::premiumLimit> get_premium_limit_object(Slice key) {
int32 default_limit = static_cast<int32>(G()->get_option_integer(PSLICE() << key << "_limit_default"));
int32 premium_limit = static_cast<int32>(G()->get_option_integer(PSLICE() << key << "_limit_premium"));
auto default_limit = static_cast<int32>(G()->get_option_integer(PSLICE() << key << "_limit_default"));
auto premium_limit = static_cast<int32>(G()->get_option_integer(PSLICE() << key << "_limit_premium"));
if (default_limit <= 0 || premium_limit <= default_limit) {
return nullptr;
}

View File

@ -32,7 +32,7 @@ class SqliteConnectionSafe {
private:
string path_;
std::atomic<uint32> close_state_ = 0;
std::atomic<uint32> close_state_{0};
LazySchedulerLocalStorage<SqliteDb> lsls_connection_;
};

View File

@ -320,7 +320,7 @@ Result<bool> HttpReader::parse_multipart_form_data(bool can_be_slow) {
header_value.remove_prefix(10);
while (true) {
header_value = trim(header_value);
const char *key_end =
const auto *key_end =
static_cast<const char *>(std::memchr(header_value.data(), '=', header_value.size()));
if (key_end == nullptr) {
break;