chore: Enable most readability checks (#7772)

This commit is contained in:
Ayaz Salikhov
2026-07-14 13:21:40 +01:00
committed by GitHub
parent acd54fd627
commit e1d4f357dc
42 changed files with 102 additions and 887 deletions

View File

@@ -464,12 +464,8 @@ same(STPathSet const& st1, Args const&... args)
if (st1.size() != st2.size())
return false;
for (auto const& p : st2)
{
if (std::ranges::find(st1, p) == st1.end())
return false;
}
return true;
return std::ranges::all_of(
st2, [&st1](auto const& p) { return std::ranges::find(st1, p) != st1.end(); });
}
json::Value

View File

@@ -326,13 +326,10 @@ AMM::expectAuctionSlot(std::vector<AccountID> const& authAccounts) const
{
return expectAuctionSlot(
[&](std::uint32_t, std::optional<std::uint8_t>, IOUAmount const&, STArray const& accounts) {
for (auto const& account : accounts)
{
if (std::ranges::find(authAccounts, account.getAccountID(sfAccount)) ==
authAccounts.end())
return false;
}
return true;
return std::ranges::all_of(accounts, [&](auto const& account) {
return std::ranges::find(authAccounts, account.getAccountID(sfAccount)) !=
authAccounts.end();
});
});
}