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:
1 file changed
+1
-1
@@ -184,7 +184,7 @@ struct CustomSentinel
|
|||||||
|
|
||||||
TEST_CASE("Parse with heterogeneous iterator and sentinel types")
|
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();
|
const char* end_ptr = json_str.data() + json_str.size();
|
||||||
|
|
||||||
// Parse using pointer and sentinel (different types)
|
// Parse using pointer and sentinel (different types)
|
||||||
|
|||||||
Reference in new issue
Block a user