From 1c79a536d1ba9815f8367d813756ec8453a8f7bc 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 e95158346..72adbf2f4 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -1759,7 +1759,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)); }