From 8f58e11020162819482d03ae7efb9ad49c9bcdb3 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 18 Oct 2019 17:27:15 +0300 Subject: [PATCH] Replace emptiness CHECK with explicit clear(). GitOrigin-RevId: 65a2a6b5c3f67845140a9d2182a1859bceaa9d7b --- td/telegram/MessagesManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index b1181b245..dce2d5a39 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -8166,7 +8166,7 @@ void MessagesManager::delete_all_dialog_messages(Dialog *d, bool remove_from_dia d->mention_notification_group.max_removed_notification_id = NotificationId(); // it is not needed anymore d->mention_notification_group.max_removed_message_id = MessageId(); // it is not needed anymore std::fill(d->message_count_by_index.begin(), d->message_count_by_index.end(), 0); - CHECK(d->notification_id_to_message_id.empty()); + d->notification_id_to_message_id.clear(); if (has_last_message_id) { set_dialog_last_message_id(d, MessageId(), "delete_all_dialog_messages"); @@ -10441,7 +10441,7 @@ void MessagesManager::set_dialog_is_empty(Dialog *d, const char *source) { set_dialog_reply_markup(d, MessageId()); } std::fill(d->message_count_by_index.begin(), d->message_count_by_index.end(), 0); - CHECK(d->notification_id_to_message_id.empty()); + d->notification_id_to_message_id.clear(); if (d->delete_last_message_date != 0) { if (d->is_last_message_deleted_locally && d->last_clear_history_date == 0) {