Skip to content

Commit 0d4138c

Browse files
committed
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>
1 parent 4c590dd commit 0d4138c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/src/unit-large_json.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ TEST_CASE("tests on deeply nested JSONs")
188188
SECTION("comparing objects")
189189
{
190190
std::string text;
191-
text.reserve(6 * depth + 1);
191+
text.reserve((6 * depth) + 1);
192192
for (std::size_t i = 0; i < depth; ++i)
193193
{
194194
text += "{\"a\":";

0 commit comments

Comments
 (0)