From 2948e572428934372e23cb803dc4619189d62dc1 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 18 Dec 2023 12:43:16 +0100 Subject: [PATCH] fix: std::views::enumerate not being widely supported yet --- main/gui/source/init/splash_window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/gui/source/init/splash_window.cpp b/main/gui/source/init/splash_window.cpp index 82e398c7e..93c52e922 100644 --- a/main/gui/source/init/splash_window.cpp +++ b/main/gui/source/init/splash_window.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include using namespace std::literals::chrono_literals; @@ -518,7 +517,8 @@ namespace hex::init { u32 lastPos = 0; u32 lastCount = 0; - for (const auto &[index, highlight] : this->highlights | std::views::enumerate) { + u32 index = 0; + for (auto &highlight : this->highlights) { u32 newPos = lastPos + lastCount + (rng() % 35); u32 newCount = (rng() % 7) + 3; highlight.start.x = float(newPos % 13); @@ -529,6 +529,7 @@ namespace hex::init { lastPos = newPos; lastCount = newCount; + index += 1; } }