diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index e4dfd459f..23b68eba9 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -1440,7 +1440,7 @@ static void remove_entities_intersecting_blockquote(vector &entit while (blockquote_it != blockquote_entities.end() && (blockquote_it->type != MessageEntity::Type::BlockQuote || blockquote_it->offset + blockquote_it->length <= entities[i].offset)) { - blockquote_it++; + ++blockquote_it; } if (blockquote_it != blockquote_entities.end() && (blockquote_it->offset + blockquote_it->length < entities[i].offset + entities[i].length || @@ -1546,17 +1546,17 @@ static vector merge_entities(vector old_entities, for (auto &old_entity : old_entities) { while (new_it != new_end && new_it->offset + new_it->length <= old_entity.offset) { result.push_back(std::move(*new_it)); - new_it++; + ++new_it; } auto old_entity_end = old_entity.offset + old_entity.length; result.push_back(std::move(old_entity)); while (new_it != new_end && new_it->offset < old_entity_end) { - new_it++; + ++new_it; } } while (new_it != new_end) { result.push_back(std::move(*new_it)); - new_it++; + ++new_it; } return result; diff --git a/td/telegram/SecureManager.cpp b/td/telegram/SecureManager.cpp index 41db3ed1b..ccecc5784 100644 --- a/td/telegram/SecureManager.cpp +++ b/td/telegram/SecureManager.cpp @@ -441,8 +441,8 @@ void SetSecureValue::start_up() { for (auto it = secure_value_.files.begin(); it != secure_value_.files.end();) { auto file_id = file_manager->get_file_view(it->file_id).file_id(); bool is_duplicate = false; - for (auto pit = secure_value_.files.begin(); pit != it; pit++) { - if (file_id == file_manager->get_file_view(pit->file_id).file_id()) { + for (auto other_it = secure_value_.files.begin(); other_it != it; ++other_it) { + if (file_id == file_manager->get_file_view(other_it->file_id).file_id()) { is_duplicate = true; break; } @@ -458,8 +458,8 @@ void SetSecureValue::start_up() { for (auto it = secure_value_.translations.begin(); it != secure_value_.translations.end();) { auto file_id = file_manager->get_file_view(it->file_id).file_id(); bool is_duplicate = file_id == front_side_file_id || file_id == reverse_side_file_id || file_id == selfie_file_id; - for (auto pit = secure_value_.translations.begin(); pit != it; pit++) { - if (file_id == file_manager->get_file_view(pit->file_id).file_id()) { + for (auto other_it = secure_value_.translations.begin(); other_it != it; ++other_it) { + if (file_id == file_manager->get_file_view(other_it->file_id).file_id()) { is_duplicate = true; break; } diff --git a/td/telegram/SuggestedAction.cpp b/td/telegram/SuggestedAction.cpp index a89e27098..2aa3026fd 100644 --- a/td/telegram/SuggestedAction.cpp +++ b/td/telegram/SuggestedAction.cpp @@ -136,8 +136,8 @@ void update_suggested_actions(vector &suggested_actions, } else if (old_it == suggested_actions.end() || *new_it < *old_it) { added_actions.push_back(*new_it++); } else { - old_it++; - new_it++; + ++old_it; + ++new_it; } } CHECK(!added_actions.empty() || !removed_actions.empty());