From a2e985554da72d2d58e6bdf882b2aca09578e474 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 21 Aug 2026 04:52:28 +0200 Subject: [PATCH] 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 --- tests/src/unit-serialization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-serialization.cpp b/tests/src/unit-serialization.cpp index 4fcaee6bd..00bd6e8aa 100644 --- a/tests/src/unit-serialization.cpp +++ b/tests/src/unit-serialization.cpp @@ -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\":";