Use range based for loop in TestSerializerPerf

CppCheck warned that `i` might be out of bound.
This commit is contained in:
phosit 2025-11-24 18:18:37 +01:00
parent 9911615e62
commit b686dfa047
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -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<unsigned int>(static_cast<u8>(byte)));
debug_printf("\n");
}