From c88b25006e603d042beb17fa6bb603e1622da6b3 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 10 Oct 2026 11:09:16 +0200 Subject: [PATCH] Index strings with size_t in the colliding-keys test (MSVC C4244 on Win32) Signed-off-by: Niels Lohmann --- tests/src/unit-json_view.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index 1c5052e6c..e8d6871d2 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -1688,7 +1688,8 @@ TEST_CASE("json_view large objects") for (std::uint64_t counter = 0; colliding.size() < members || spread.size() < members; ++counter) { std::string key(8, 'a'); - for (std::uint64_t x = counter, i = 0; i < 8; ++i, x /= 26) + std::uint64_t x = counter; + for (std::size_t i = 0; i < 8; ++i, x /= 26) { key[i] = static_cast('a' + (x % 26)); }