mirror of
https://github.com/nlohmann/json.git
synced 2026-07-11 13:05:11 +00:00
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 <mail@nlohmann.me>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user