From b686dfa0470181cda366f85f58ffc66809fa9193 Mon Sep 17 00:00:00 2001 From: phosit Date: Mon, 24 Nov 2025 18:18:37 +0100 Subject: [PATCH] Use range based for loop in TestSerializerPerf CppCheck warned that `i` might be out of bound. --- source/simulation2/tests/test_Serializer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/simulation2/tests/test_Serializer.h b/source/simulation2/tests/test_Serializer.h index 446ab27283..3a00285e48 100644 --- a/source/simulation2/tests/test_Serializer.h +++ b/source/simulation2/tests/test_Serializer.h @@ -925,8 +925,8 @@ public: debug_printf("\n"); debug_printf("# size = %d\n", (int)str.str().length()); debug_printf("# hash = "); - for (size_t i = 0; i < hash.size(); ++i) - debug_printf("%02x", (unsigned int)(u8)hash[i]); + for (const char byte : hash) + debug_printf("%02x", static_cast(static_cast(byte))); debug_printf("\n"); }