mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 08:46:46 +00:00
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:
@@ -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`"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user