From d23806a327d47b89a1058cf582614c58eb034201 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 11 Jul 2026 10:05:12 +0200 Subject: [PATCH] Fix clang-tidy misc-const-correctness in heterogeneous sentinel test json_str is only read via .data()/.size() and never reassigned, so clang-tidy correctly flags it as const-able. Verified against the exact CI job (silkeh/clang:dev, ci_clang_tidy target) by running clang-tidy directly on this file plus the five binary-format sentinel tests touched by prior commits; all are now clean. Signed-off-by: Niels Lohmann --- tests/src/unit-user_defined_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-user_defined_input.cpp b/tests/src/unit-user_defined_input.cpp index 0884b193d..cb93439e5 100644 --- a/tests/src/unit-user_defined_input.cpp +++ b/tests/src/unit-user_defined_input.cpp @@ -184,7 +184,7 @@ struct CustomSentinel TEST_CASE("Parse with heterogeneous iterator and sentinel types") { - std::string json_str = R"({"key":"value"})"; + const std::string json_str = R"({"key":"value"})"; const char* end_ptr = json_str.data() + json_str.size(); // Parse using pointer and sentinel (different types)