1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: std::views::enumerate not being widely supported yet

This commit is contained in:
WerWolv 2023-12-18 12:43:16 +01:00
parent 521ee5fe2d
commit 2948e57242

View File

@ -25,7 +25,6 @@
#include <future>
#include <numeric>
#include <random>
#include <ranges>
#include <nlohmann/json.hpp>
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;
}
}