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

@@ -13,6 +13,7 @@
#include <xrpl/protocol/UintTypes.h>
#include <xrpl/protocol/jss.h>
#include <algorithm>
#include <cstddef>
#include <stdexcept>
#include <utility>
@@ -159,13 +160,10 @@ STPathSet::isDefault() const
bool
STPath::hasSeen(AccountID const& account, PathAsset const& asset, AccountID const& issuer) const
{
for (auto& p : path_)
{
if (p.getAccountID() == account && p.getPathAsset() == asset && p.getIssuerID() == issuer)
return true;
}
return false;
return std::ranges::any_of(path_, [&](auto& p) {
return p.getAccountID() == account && p.getPathAsset() == asset &&
p.getIssuerID() == issuer;
});
}
json::Value