Parenthesize the reserve arithmetic in the deep-nesting test

clang-tidy's readability-math-missing-parentheses wants the multiplication
spelled out in reserve(6 * depth + 1), and CI treats its warnings as errors.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-09-01 05:24:31 +00:00
committed by Claude
parent 1bbf39e8b4
commit ee8b2d1699
+1 -1
View File
@@ -540,7 +540,7 @@ TEST_CASE("serialization of deeply nested values")
CHECK(json::parse(array_text).dump() == array_text);
std::string object_text;
object_text.reserve(6 * depth + 1);
object_text.reserve((6 * depth) + 1);
for (std::size_t i = 0; i < depth; ++i)
{
object_text += "{\"a\":";