diff --git a/Telegram/SourceFiles/boxes/single_choice_box.cpp b/Telegram/SourceFiles/boxes/single_choice_box.cpp index f617a5fca..f40c82eef 100644 --- a/Telegram/SourceFiles/boxes/single_choice_box.cpp +++ b/Telegram/SourceFiles/boxes/single_choice_box.cpp @@ -38,7 +38,7 @@ void SingleChoiceBox::prepare() { content->add(object_ptr( content, st::boxOptionListPadding.top() + st::autolockButton.margin.top())); - auto &&ints = ranges::view::ints(0); + auto &&ints = ranges::view::ints(0, ranges::unreachable); for (const auto &[i, text] : ranges::view::zip(ints, _optionTexts)) { content->add( object_ptr( diff --git a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp index 09fd1dc95..f3b6635e2 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp @@ -367,7 +367,7 @@ void Row::paintPreview(Painter &p) const { const auto y = st::manageEmojiPreviewPadding.top(); const auto width = st::manageEmojiPreviewWidth; const auto height = st::manageEmojiPreviewWidth; - auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0)); + auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0, int(_preview.size()))); for (const auto &[pixmap, index] : preview) { const auto row = (index / 2); const auto column = (index % 2); @@ -570,7 +570,7 @@ void Row::setupPreview(const Set &set) { const auto size = st::manageEmojiPreview * cIntRetinaFactor(); const auto original = QImage(set.previewPath); const auto full = original.height(); - auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0)); + auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0, int(_preview.size()))); for (auto &&[pixmap, index] : preview) { pixmap = App::pixmapFromImageInPlace(original.copy( { full * index, 0, full, full } diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 6f71c940a..a0de1069c 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -2962,7 +2962,7 @@ void InnerWidget::setupShortcuts() { Command::ChatPinned4, Command::ChatPinned5, }; - auto &&pinned = ranges::view::zip(kPinned, ranges::view::ints(0)); + auto &&pinned = ranges::view::zip(kPinned, ranges::view::ints(0, ranges::unreachable)); for (const auto [command, index] : pinned) { request->check(command) && request->handle([=, index = index] { const auto list = session().data().chatsList()->indexed(); diff --git a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp index 87e1ca4d0..d095ad661 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp @@ -91,7 +91,7 @@ void CountNicePercent( auto &&zipped = ranges::view::zip( votes, items, - ranges::view::ints(0)); + ranges::view::ints(0, int(items.size()))); for (auto &&[votes, item, index] : zipped) { item.index = index; item.percent = (votes * 100) / total; diff --git a/Telegram/SourceFiles/ui/image/image_prepare.cpp b/Telegram/SourceFiles/ui/image/image_prepare.cpp index ea011b0d0..52631dd93 100644 --- a/Telegram/SourceFiles/ui/image/image_prepare.cpp +++ b/Telegram/SourceFiles/ui/image/image_prepare.cpp @@ -262,7 +262,7 @@ QImage BlurLargeImage(QImage image, int radius) { const auto dvs = take(dvcount); auto &&ints = ranges::view::ints; - for (auto &&[value, index] : ranges::view::zip(dvs, ints(0))) { + for (auto &&[value, index] : ranges::view::zip(dvs, ints(0, ranges::unreachable))) { value = (index / divsum); } const auto dv = dvs.data();