From 15ff3701a15f4654332f04cf14e405306aaad5cc Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 22 Dec 2024 13:30:36 +0100 Subject: [PATCH] :rotating_light: fix warnings --- include/nlohmann/detail/output/serializer.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index aafa21a12..4171abea8 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -578,7 +578,7 @@ class serializer case error_handler_t::keep: { // copy undumped chars to string buffer - for (int j = 0; j < undumped_chars; ++j) + for (std::size_t j = 0; j < undumped_chars; ++j) { string_buffer[bytes++] = s[bytes_after_last_accept + j]; } @@ -632,7 +632,7 @@ class serializer case error_handler_t::keep: { // copy undumped chars to string buffer - for (int j = 0; j < undumped_chars; ++j) + for (std::size_t j = 0; j < undumped_chars; ++j) { string_buffer[bytes++] = s[bytes_after_last_accept + j]; } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index e8b80ad33..f0b118718 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -19140,7 +19140,7 @@ class serializer case error_handler_t::keep: { // copy undumped chars to string buffer - for (int j = 0; j < undumped_chars; ++j) + for (std::size_t j = 0; j < undumped_chars; ++j) { string_buffer[bytes++] = s[bytes_after_last_accept + j]; } @@ -19194,7 +19194,7 @@ class serializer case error_handler_t::keep: { // copy undumped chars to string buffer - for (int j = 0; j < undumped_chars; ++j) + for (std::size_t j = 0; j < undumped_chars; ++j) { string_buffer[bytes++] = s[bytes_after_last_accept + j]; }