Minor warning fixes.
This commit is contained in:
parent
3abac23287
commit
9b7957c9c6
@ -1041,14 +1041,13 @@ void ConfigManager::set_archive_and_mute(bool archive_and_mute, Promise<Unit> &&
|
||||
|
||||
void ConfigManager::on_dc_options_update(DcOptions dc_options) {
|
||||
save_dc_options_update(dc_options);
|
||||
send_closure(config_recoverer_, &ConfigRecoverer::on_dc_options_update, std::move(dc_options));
|
||||
if (dc_options.dc_options.empty()) {
|
||||
return;
|
||||
}
|
||||
if (!dc_options.dc_options.empty()) {
|
||||
expire_time_ = Timestamp::now();
|
||||
save_config_expire(expire_time_);
|
||||
set_timeout_in(expire_time_.in());
|
||||
}
|
||||
send_closure(config_recoverer_, &ConfigRecoverer::on_dc_options_update, std::move(dc_options));
|
||||
}
|
||||
|
||||
void ConfigManager::request_config_from_dc_impl(DcId dc_id) {
|
||||
config_sent_cnt_++;
|
||||
|
@ -2258,7 +2258,7 @@ std::pair<int32, int32> GroupCallManager::process_group_call_participant(InputGr
|
||||
}
|
||||
on_add_group_call_participant(input_group_call_id, participants->participants.back().dialog_id);
|
||||
on_participant_speaking_in_group_call(input_group_call_id, participants->participants.back());
|
||||
return {diff, participant.video_diff};
|
||||
return {diff, participants->participants.back().video_diff};
|
||||
}
|
||||
|
||||
void GroupCallManager::on_add_group_call_participant(InputGroupCallId input_group_call_id,
|
||||
|
@ -4344,7 +4344,8 @@ unique_ptr<MessageContent> dup_message_content(Td *td, DialogId dialog_id, const
|
||||
}
|
||||
|
||||
result->photo.photos.clear();
|
||||
if (thumbnail.type != 0) {
|
||||
bool has_thumbnail = thumbnail.type != 0;
|
||||
if (has_thumbnail) {
|
||||
thumbnail.type = 't';
|
||||
result->photo.photos.push_back(std::move(thumbnail));
|
||||
}
|
||||
@ -4356,7 +4357,7 @@ unique_ptr<MessageContent> dup_message_content(Td *td, DialogId dialog_id, const
|
||||
}
|
||||
|
||||
result->photo.photos.back().file_id = fix_file_id(result->photo.photos.back().file_id);
|
||||
if (thumbnail.type != 0) {
|
||||
if (has_thumbnail) {
|
||||
result->photo.photos[0].file_id = td->file_manager_->dup_file_id(result->photo.photos[0].file_id);
|
||||
}
|
||||
return std::move(result);
|
||||
|
@ -3010,8 +3010,8 @@ static Result<vector<MessageEntity>> do_parse_html(CSlice text, string &result)
|
||||
|
||||
if (tag_name == "a" && attribute_name == Slice("href")) {
|
||||
argument = std::move(attribute_value);
|
||||
}
|
||||
if (tag_name == "code" && attribute_name == Slice("class") && begins_with(attribute_value, "language-")) {
|
||||
} else if (tag_name == "code" && attribute_name == Slice("class") &&
|
||||
begins_with(attribute_value, "language-")) {
|
||||
argument = attribute_value.substr(9);
|
||||
}
|
||||
}
|
||||
|
@ -16029,8 +16029,7 @@ void MessagesManager::reload_pinned_dialogs(DialogListId dialog_list_id, Promise
|
||||
if (dialog_list_id.is_folder()) {
|
||||
send_closure(td_->create_net_actor<GetPinnedDialogsActor>(std::move(promise)), &GetPinnedDialogsActor::send,
|
||||
dialog_list_id.get_folder_id(), get_sequence_dispatcher_id(DialogId(), MessageContentType::None));
|
||||
}
|
||||
if (dialog_list_id.is_filter()) {
|
||||
} else if (dialog_list_id.is_filter()) {
|
||||
schedule_dialog_filters_reload(0.0);
|
||||
dialog_filter_reload_queries_.push_back(std::move(promise));
|
||||
}
|
||||
@ -23229,7 +23228,7 @@ unique_ptr<MessagesManager::Message> MessagesManager::create_message_to_send(
|
||||
}
|
||||
m->content = std::move(content);
|
||||
m->forward_info = std::move(forward_info);
|
||||
m->is_copy = is_copy || forward_info != nullptr;
|
||||
m->is_copy = is_copy || m->forward_info != nullptr;
|
||||
|
||||
if (td_->auth_manager_->is_bot() || options.disable_notification ||
|
||||
G()->shared_config().get_option_boolean("ignore_default_disable_notification")) {
|
||||
|
@ -616,7 +616,7 @@ PollId PollManager::create_poll(string &&question, vector<string> &&options, boo
|
||||
CHECK(is_local_poll_id(poll_id));
|
||||
bool is_inserted = polls_.emplace(poll_id, std::move(poll)).second;
|
||||
CHECK(is_inserted);
|
||||
LOG(INFO) << "Created " << poll_id << " with question \"" << oneline(question) << '"';
|
||||
LOG(INFO) << "Created " << poll_id << " with question \"" << oneline(poll->question) << '"';
|
||||
return poll_id;
|
||||
}
|
||||
|
||||
|
@ -1636,6 +1636,7 @@ vector<td_api::object_ptr<td_api::closedVectorPath>> StickersManager::get_sticke
|
||||
}
|
||||
if (!commands.empty()) {
|
||||
result.push_back(td_api::make_object<td_api::closedVectorPath>(std::move(commands)));
|
||||
commands.clear();
|
||||
}
|
||||
is_closed = true;
|
||||
break;
|
||||
|
@ -1877,7 +1877,6 @@ void UpdatesManager::process_updates(vector<tl_object_ptr<telegram_api::Update>>
|
||||
}
|
||||
}
|
||||
if (force_apply) {
|
||||
// forcely process pts updates
|
||||
for (auto &update : updates) {
|
||||
if (update != nullptr && is_pts_update(update.get())) {
|
||||
auto constructor_id = update->get_id();
|
||||
|
@ -515,7 +515,7 @@ void Session::on_closed(Status status) {
|
||||
LOG(WARNING) << "Invalidate CDN tmp_key";
|
||||
auth_data_.drop_main_auth_key();
|
||||
on_auth_key_updated();
|
||||
on_session_failed(std::move(status));
|
||||
on_session_failed(status.clone());
|
||||
} else if (need_destroy_) {
|
||||
auth_data_.drop_main_auth_key();
|
||||
on_auth_key_updated();
|
||||
|
@ -71,8 +71,9 @@ inline Status from_json(int32 &to, JsonValue from) {
|
||||
}
|
||||
|
||||
inline Status from_json(bool &to, JsonValue from) {
|
||||
if (from.type() != JsonValue::Type::Boolean) {
|
||||
if (from.type() == JsonValue::Type::Null) {
|
||||
auto from_type = from.type();
|
||||
if (from_type != JsonValue::Type::Boolean) {
|
||||
if (from_type == JsonValue::Type::Null) {
|
||||
return Status::OK();
|
||||
}
|
||||
int32 x = 0;
|
||||
@ -81,7 +82,7 @@ inline Status from_json(bool &to, JsonValue from) {
|
||||
to = x != 0;
|
||||
return Status::OK();
|
||||
}
|
||||
return Status::Error(PSLICE() << "Expected Boolean, got " << from.type());
|
||||
return Status::Error(PSLICE() << "Expected Boolean, got " << from_type);
|
||||
}
|
||||
to = from.get_boolean();
|
||||
return Status::OK();
|
||||
|
@ -94,6 +94,7 @@ class UdpReader {
|
||||
}
|
||||
if (status.is_error() && !UdpSocketFd::is_critical_read_error(status)) {
|
||||
queue.push(UdpMessage{{}, {}, std::move(status)});
|
||||
status = Status::OK();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user