Don't create vectors using set iterators.
This commit is contained in:
parent
29caadd4c9
commit
37123a50ff
@ -15368,8 +15368,10 @@ void MessagesManager::remove_dialog_mention_notifications(Dialog *d) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<NotificationId> removed_notification_ids(removed_notification_ids_set.begin(),
|
vector<NotificationId> removed_notification_ids;
|
||||||
removed_notification_ids_set.end());
|
for (auto notification_id : removed_notification_ids_set) {
|
||||||
|
removed_notification_ids.push_back(notification_id);
|
||||||
|
}
|
||||||
for (size_t i = 0; i < removed_notification_ids.size(); i++) {
|
for (size_t i = 0; i < removed_notification_ids.size(); i++) {
|
||||||
send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification, notification_group_id,
|
send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification, notification_group_id,
|
||||||
removed_notification_ids[i], false, i + 1 == removed_notification_ids.size(), Promise<Unit>(),
|
removed_notification_ids[i], false, i + 1 == removed_notification_ids.size(), Promise<Unit>(),
|
||||||
|
@ -5001,8 +5001,12 @@ void StickersManager::read_featured_sticker_sets(void *td_void) {
|
|||||||
auto td = static_cast<Td *>(td_void);
|
auto td = static_cast<Td *>(td_void);
|
||||||
|
|
||||||
auto &set_ids = td->stickers_manager_->pending_viewed_featured_sticker_set_ids_;
|
auto &set_ids = td->stickers_manager_->pending_viewed_featured_sticker_set_ids_;
|
||||||
td->create_handler<ReadFeaturedStickerSetsQuery>()->send(vector<StickerSetId>(set_ids.begin(), set_ids.end()));
|
vector<StickerSetId> sticker_set_ids;
|
||||||
|
for (auto sticker_set_id : set_ids) {
|
||||||
|
sticker_set_ids.push_back(sticker_set_id);
|
||||||
|
}
|
||||||
set_ids.clear();
|
set_ids.clear();
|
||||||
|
td->create_handler<ReadFeaturedStickerSetsQuery>()->send(std::move(sticker_set_ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<int32, vector<StickerSetId>> StickersManager::get_archived_sticker_sets(bool is_masks,
|
std::pair<int32, vector<StickerSetId>> StickersManager::get_archived_sticker_sets(bool is_masks,
|
||||||
|
@ -1335,9 +1335,7 @@ void WebPagesManager::on_web_page_changed(WebPageId web_page_id, bool have_web_p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (have_web_page) {
|
if (have_web_page) {
|
||||||
LOG_CHECK(web_page_messages_[web_page_id].size() == full_message_ids.size())
|
CHECK(web_page_messages_[web_page_id].size() == full_message_ids.size());
|
||||||
<< full_message_ids << ' '
|
|
||||||
<< std::vector<FullMessageId>(web_page_messages_[web_page_id].begin(), web_page_messages_[web_page_id].end());
|
|
||||||
} else {
|
} else {
|
||||||
CHECK(web_page_messages_.count(web_page_id) == 0);
|
CHECK(web_page_messages_.count(web_page_id) == 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user