Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Aug 18, 2022
1 parent af8042d commit 515a9cf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion td/telegram/AnimationsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions td/telegram/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions td/telegram/Premium.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion tddb/td/db/SqliteConnectionSafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
};

Expand Down
2 changes: 1 addition & 1 deletion tdnet/td/net/HttpReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 515a9cf

Please sign in to comment.