Parenthesise the reserve() computation in the comparison test

clang-tidy reports the mixed * and + as readability-math-missing-
parentheses, as it does for the identical line in the copy test.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-09-03 20:36:04 +02:00
committed by GitHub
parent 05ac72d322
commit 871e8eaa12
+1 -1
View File
@@ -188,7 +188,7 @@ TEST_CASE("tests on deeply nested JSONs")
SECTION("comparing objects")
{
std::string text;
text.reserve(6 * depth + 1);
text.reserve((6 * depth) + 1);
for (std::size_t i = 0; i < depth; ++i)
{
text += "{\"a\":";