Parenthesize multiplications in the hash test for clang-tidy
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
21c626c641
commit
e9af5cbd11
1 file changed
+2
-2
@@ -68,7 +68,7 @@ std::string nested_text(const std::size_t depth, const bool objects)
|
|||||||
std::string text;
|
std::string text;
|
||||||
if (objects)
|
if (objects)
|
||||||
{
|
{
|
||||||
text.reserve(6 * depth + 1);
|
text.reserve((6 * depth) + 1);
|
||||||
for (std::size_t i = 0; i < depth; ++i)
|
for (std::size_t i = 0; i < depth; ++i)
|
||||||
{
|
{
|
||||||
text += "{\"a\":";
|
text += "{\"a\":";
|
||||||
@@ -189,7 +189,7 @@ TEST_CASE("hash of deeply nested values")
|
|||||||
SECTION("hashing past the descent bound computes the same values")
|
SECTION("hashing past the descent bound computes the same values")
|
||||||
{
|
{
|
||||||
// every depth on either side of where the iterative path takes over
|
// every depth on either side of where the iterative path takes over
|
||||||
for (std::size_t depth = 0; depth <= 2 * nlohmann::detail::recursion_depth_limit() + 10; ++depth)
|
for (std::size_t depth = 0; depth <= (2 * nlohmann::detail::recursion_depth_limit()) + 10; ++depth)
|
||||||
{
|
{
|
||||||
CAPTURE(depth);
|
CAPTURE(depth);
|
||||||
const auto arrays = nested<json>(depth, false);
|
const auto arrays = nested<json>(depth, false);
|
||||||
|
|||||||
Reference in new issue
Block a user