2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Get rid of deprecated ranges::view usage

This commit is contained in:
Ilya Fedin
2021-03-13 16:12:08 +04:00
committed by John Preston
parent c4dcf064d5
commit c0c10689a1
75 changed files with 270 additions and 270 deletions

View File

@@ -362,9 +362,9 @@ Data::MessagesSlice ScheduledMessages::list(not_null<History*> history) {
const auto &list = i->second.items;
result.skippedAfter = result.skippedBefore = 0;
result.fullCount = int(list.size());
result.ids = ranges::view::all(
result.ids = ranges::views::all(
list
) | ranges::view::transform(
) | ranges::views::transform(
&HistoryItem::fullId
) | ranges::to_vector;
return result;
@@ -534,11 +534,11 @@ int32 ScheduledMessages::countListHash(const List &list) const {
using namespace Api;
auto hash = HashInit();
auto &&serverside = ranges::view::all(
auto &&serverside = ranges::views::all(
list.items
) | ranges::view::filter([](const OwnedItem &item) {
) | ranges::views::filter([](const OwnedItem &item) {
return !item->isSending() && !item->hasFailed();
}) | ranges::view::reverse;
}) | ranges::views::reverse;
for (const auto &item : serverside) {
const auto j = list.idByItem.find(item.get());
HashUpdate(hash, j->second);