chore: Enable clang-tidy modernize checks (#6975)

Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
This commit is contained in:
Alex Kremer
2026-04-21 16:32:51 +01:00
committed by GitHub
parent ab887f5049
commit ce3951bbb3
699 changed files with 4626 additions and 5292 deletions

View File

@@ -419,8 +419,7 @@ class STParsedJSON_test : public beast::unit_test::suite
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
auto const& h128 = obj.object->getFieldH128(sfEmailHash);
BEAST_EXPECT(h128.size() == 16);
bool const allZero =
std::all_of(h128.begin(), h128.end(), [](auto b) { return b == 0; });
bool const allZero = std::ranges::all_of(h128, [](auto b) { return b == 0; });
BEAST_EXPECT(allZero);
}
@@ -515,8 +514,7 @@ class STParsedJSON_test : public beast::unit_test::suite
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
auto const& h160 = obj.object->getFieldH160(sfTakerPaysCurrency);
BEAST_EXPECT(h160.size() == 20);
bool const allZero =
std::all_of(h160.begin(), h160.end(), [](auto b) { return b == 0; });
bool const allZero = std::ranges::all_of(h160, [](auto b) { return b == 0; });
BEAST_EXPECT(allZero);
}
@@ -604,8 +602,7 @@ class STParsedJSON_test : public beast::unit_test::suite
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
auto const& h192 = obj.object->getFieldH192(sfMPTokenIssuanceID);
BEAST_EXPECT(h192.size() == 24);
bool const allZero =
std::all_of(h192.begin(), h192.end(), [](auto b) { return b == 0; });
bool const allZero = std::ranges::all_of(h192, [](auto b) { return b == 0; });
BEAST_EXPECT(allZero);
}
@@ -706,8 +703,7 @@ class STParsedJSON_test : public beast::unit_test::suite
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
auto const& h256 = obj.object->getFieldH256(sfLedgerHash);
BEAST_EXPECT(h256.size() == 32);
bool const allZero =
std::all_of(h256.begin(), h256.end(), [](auto b) { return b == 0; });
bool const allZero = std::ranges::all_of(h256, [](auto b) { return b == 0; });
BEAST_EXPECT(allZero);
}
@@ -2149,7 +2145,7 @@ class STParsedJSON_test : public beast::unit_test::suite
catch (std::runtime_error const& e)
{
std::string const what(e.what());
unexpected(what.find("First level children of `Template`") != 0);
unexpected(!what.starts_with("First level children of `Template`"));
}
}
}