diff options
| -rw-r--r-- | td/telegram/CallActor.cpp | 4 | ||||
| -rw-r--r-- | td/telegram/CallActor.h | 2 | ||||
| -rw-r--r-- | td/telegram/Dependencies.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/DialogFilter.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/DialogFilterManager.cpp | 4 | ||||
| -rw-r--r-- | td/telegram/DialogInviteLinkManager.h | 2 | ||||
| -rw-r--r-- | td/telegram/DialogManager.cpp | 3 | ||||
| -rw-r--r-- | td/telegram/DocumentsManager.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/ForumTopicManager.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/files/FileManager.cpp | 2 | ||||
| -rw-r--r-- | tde2e/td/e2e/Blockchain.cpp | 1 | ||||
| -rw-r--r-- | tde2e/td/e2e/Call.cpp | 6 |
12 files changed, 16 insertions, 16 deletions
diff --git a/td/telegram/CallActor.cpp b/td/telegram/CallActor.cpp index 7790fa768..8607c8c85 100644 --- a/td/telegram/CallActor.cpp +++ b/td/telegram/CallActor.cpp @@ -552,7 +552,7 @@ void CallActor::update_call(tl_object_ptr<telegram_api::PhoneCall> call) { case telegram_api::phoneCallAccepted::ID: return do_update_call(static_cast<const telegram_api::phoneCallAccepted &>(*call)); case telegram_api::phoneCall::ID: - return do_update_call(static_cast<const telegram_api::phoneCall &>(*call)); + return do_update_call(static_cast<telegram_api::phoneCall &>(*call)); case telegram_api::phoneCallDiscarded::ID: return do_update_call(static_cast<const telegram_api::phoneCallDiscarded &>(*call)); default: @@ -689,7 +689,7 @@ void CallActor::update_conference_call(const telegram_api::object_ptr<telegram_a } } -Status CallActor::do_update_call(const telegram_api::phoneCall &call) { +Status CallActor::do_update_call(telegram_api::phoneCall &call) { if (state_ != State::WaitAcceptResult && state_ != State::WaitConfirmResult) { if (state_ == State::Ready) { update_conference_call(call.conference_call_); diff --git a/td/telegram/CallActor.h b/td/telegram/CallActor.h index 801c90bde..3a9a2e250 100644 --- a/td/telegram/CallActor.h +++ b/td/telegram/CallActor.h @@ -183,7 +183,7 @@ class CallActor final : public NetQueryCallback { Status do_update_call(const telegram_api::phoneCallWaiting &call); Status do_update_call(const telegram_api::phoneCallRequested &call); Status do_update_call(const telegram_api::phoneCallAccepted &call); - Status do_update_call(const telegram_api::phoneCall &call); + Status do_update_call(telegram_api::phoneCall &call); Status do_update_call(const telegram_api::phoneCallDiscarded &call); void on_get_call_id(); diff --git a/td/telegram/Dependencies.cpp b/td/telegram/Dependencies.cpp index b8a67eb5b..8708f6e55 100644 --- a/td/telegram/Dependencies.cpp +++ b/td/telegram/Dependencies.cpp @@ -142,7 +142,7 @@ bool Dependencies::resolve_force(Td *td, const char *source, bool ignore_errors) LOG(INFO) << "Can't find " << web_page_id << " from " << source; } } - for (auto story_full_id : story_full_ids) { + for (const auto &story_full_id : story_full_ids) { if (!td->story_manager_->have_story_force(story_full_id)) { LOG(INFO) << "Can't find " << story_full_id << " from " << source; } diff --git a/td/telegram/DialogFilter.cpp b/td/telegram/DialogFilter.cpp index 4e397d90a..0391abb08 100644 --- a/td/telegram/DialogFilter.cpp +++ b/td/telegram/DialogFilter.cpp @@ -205,7 +205,7 @@ void DialogFilter::set_dialog_is_pinned(InputDialogId input_dialog_id, bool is_p void DialogFilter::set_pinned_dialog_ids(vector<InputDialogId> &&input_dialog_ids) { FlatHashSet<DialogId, DialogIdHash> new_pinned_dialog_ids; - for (auto input_dialog_id : input_dialog_ids) { + for (const auto &input_dialog_id : input_dialog_ids) { auto dialog_id = input_dialog_id.get_dialog_id(); CHECK(dialog_id.is_valid()); new_pinned_dialog_ids.insert(dialog_id); diff --git a/td/telegram/DialogFilterManager.cpp b/td/telegram/DialogFilterManager.cpp index 4675df7b9..048c0a4f6 100644 --- a/td/telegram/DialogFilterManager.cpp +++ b/td/telegram/DialogFilterManager.cpp @@ -580,8 +580,8 @@ class DialogFilterManager::DialogFiltersLogEvent { int32 server_main_dialog_list_position = 0; int32 main_dialog_list_position = 0; int32 updated_date = 0; - const vector<unique_ptr<DialogFilter>> *server_dialog_filters_in; - const vector<unique_ptr<DialogFilter>> *dialog_filters_in; + const vector<unique_ptr<DialogFilter>> *server_dialog_filters_in = nullptr; + const vector<unique_ptr<DialogFilter>> *dialog_filters_in = nullptr; vector<unique_ptr<DialogFilter>> server_dialog_filters_out; vector<unique_ptr<DialogFilter>> dialog_filters_out; bool server_are_tags_enabled = false; diff --git a/td/telegram/DialogInviteLinkManager.h b/td/telegram/DialogInviteLinkManager.h index cfddc5717..f3a44f399 100644 --- a/td/telegram/DialogInviteLinkManager.h +++ b/td/telegram/DialogInviteLinkManager.h @@ -117,7 +117,7 @@ class DialogInviteLinkManager final : public Actor { vector<UserId> participant_user_ids; string description; StarSubscriptionPricing subscription_pricing; - int64 subscription_form_id; + int64 subscription_form_id = 0; CustomEmojiId bot_verification_icon; bool creates_join_request = false; bool can_refulfill_subscription = false; diff --git a/td/telegram/DialogManager.cpp b/td/telegram/DialogManager.cpp index fb5b8337e..64d95b332 100644 --- a/td/telegram/DialogManager.cpp +++ b/td/telegram/DialogManager.cpp @@ -3324,8 +3324,7 @@ void DialogManager::on_get_blocked_dialogs(int32 offset, int32 limit, int32 tota void DialogManager::set_dialog_available_reactions_on_server(DialogId dialog_id, const ChatReactions &available_reactions, Promise<Unit> &&promise) { - td_->create_handler<SetChatAvailableReactionsQuery>(std::move(promise)) - ->send(dialog_id, std::move(available_reactions)); + td_->create_handler<SetChatAvailableReactionsQuery>(std::move(promise))->send(dialog_id, available_reactions); } void DialogManager::set_dialog_default_send_as_on_server(DialogId dialog_id, DialogId send_as_dialog_id, diff --git a/td/telegram/DocumentsManager.cpp b/td/telegram/DocumentsManager.cpp index e0e682fad..c1aa36310 100644 --- a/td/telegram/DocumentsManager.cpp +++ b/td/telegram/DocumentsManager.cpp @@ -419,10 +419,10 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo if (remote_document.thumbnail.type == 'v') { static_cast<PhotoSize &>(animated_thumbnail) = std::move(remote_document.thumbnail); } else { - thumbnail = std::move(remote_document.thumbnail); if (remote_document.thumbnail.type == 'g') { thumbnail_format = PhotoFormat::Gif; } + thumbnail = std::move(remote_document.thumbnail); } auto web_document_ptr = std::move(remote_document.web_document); diff --git a/td/telegram/ForumTopicManager.cpp b/td/telegram/ForumTopicManager.cpp index 764df1d51..49199ad29 100644 --- a/td/telegram/ForumTopicManager.cpp +++ b/td/telegram/ForumTopicManager.cpp @@ -1038,7 +1038,7 @@ MessageId ForumTopicManager::on_get_forum_topic_impl(DialogId dialog_id, topic->topic_ == nullptr ? nullptr : topic->topic_->get_notification_settings(); auto forum_topic_full = td::make_unique<ForumTopic>(td_, std::move(forum_topic), current_notification_settings); if (forum_topic_full->is_short()) { - LOG(ERROR) << "Receive short " << to_string(forum_topic); + LOG(ERROR) << "Receive short forum topic"; return MessageId(); } if (topic->topic_ == nullptr || true) { diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 832a7c55b..48c34806b 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -1894,7 +1894,7 @@ Result<FileId> FileManager::register_file(FileData &&data, FileLocationSource fi return std::move(status); } } else { - data.local_ = LocalFileLocation(std::move(r_info.ok().location_)); + data.local_ = LocalFileLocation(std::move(r_info.ok_ref().location_)); data.size_ = r_info.ok().size_; } } else { diff --git a/tde2e/td/e2e/Blockchain.cpp b/tde2e/td/e2e/Blockchain.cpp index 139e4a3e0..a477beade 100644 --- a/tde2e/td/e2e/Blockchain.cpp +++ b/tde2e/td/e2e/Blockchain.cpp @@ -409,6 +409,7 @@ td::Status State::clear_shared_key(const Permissions &permissions) { } td::Status State::validate_shared_key(const GroupSharedKeyRef &shared_key, const GroupStateRef &group_state) { + CHECK(shared_key != nullptr); if (shared_key->empty()) { return td::Status::OK(); } diff --git a/tde2e/td/e2e/Call.cpp b/tde2e/td/e2e/Call.cpp index 806a01891..f249c1f29 100644 --- a/tde2e/td/e2e/Call.cpp +++ b/tde2e/td/e2e/Call.cpp @@ -313,8 +313,8 @@ td::Result<std::string> CallEncryption::decrypt(td::int64 user_id, td::int32 cha TRY_STATUS(parser.get_status()); for (td::int32 i = 0; i < epochs_n; i++) { - auto epoch_hash = epoch_hashes[i]; - auto encrypted_header = encrypted_headers[i]; + const auto &epoch_hash = epoch_hashes[i]; + const auto &encrypted_header = encrypted_headers[i]; if (auto it = epoch_by_hash_.find(epoch_hash); it != epoch_by_hash_.end()) { auto it2 = epochs_.find(it->second); if (it2 != epochs_.end()) { @@ -567,7 +567,7 @@ td::Result<std::string> Call::create_self_add_block(const PrivateKey &private_ke td::remove_if(old_state.participants, [&self](const GroupParticipant &participant) { return participant.user_id == self.user_id; }); old_state.participants.push_back(self); - auto new_group_state = std::make_shared<GroupState>(std::move(old_state)); + auto new_group_state = std::make_shared<GroupState>(old_state); TRY_RESULT(changes, make_changes_for_new_state(std::move(new_group_state))); return blockchain.build_block(changes, private_key); } |
