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

@@ -38,9 +38,7 @@
#include <utility>
#include <vector>
namespace xrpl {
namespace test {
namespace jtx {
namespace xrpl::test::jtx {
static Number
number(STAmount const& a)
@@ -63,9 +61,9 @@ AMM::initialTokens()
AMM::AMM(
Env& env,
Account const& account,
STAmount const& asset1,
STAmount const& asset2,
Account account,
STAmount asset1,
STAmount asset2,
bool log,
std::uint16_t tfee,
std::uint32_t fee,
@@ -75,14 +73,14 @@ AMM::AMM(
std::optional<ter> const& ter,
bool close)
: env_(env)
, creatorAccount_(account)
, asset1_(asset1)
, asset2_(asset2)
, creatorAccount_(std::move(account))
, asset1_(std::move(asset1))
, asset2_(std::move(asset2))
, ammID_(keylet::amm(asset1_.asset(), asset2_.asset()).key)
, log_(log)
, doClose_(close)
, lastPurchasePrice_(0)
, msig_(ms)
, msig_(std::move(ms))
, fee_(fee)
, ammAccount_(create(tfee, flags, seq, ter))
, lptIssue_(xrpl::ammLPTIssue(asset1_.asset(), asset2_.asset(), ammAccount_))
@@ -312,10 +310,8 @@ AMM::expectAuctionSlot(std::vector<AccountID> const& authAccounts) const
[&](std::uint32_t, std::optional<std::uint8_t>, IOUAmount const&, STArray const& accounts) {
for (auto const& account : accounts)
{
if (std::find(
authAccounts.cbegin(),
authAccounts.cend(),
account.getAccountID(sfAccount)) == authAccounts.end())
if (std::ranges::find(authAccounts, account.getAccountID(sfAccount)) ==
authAccounts.end())
return false;
}
return true;
@@ -922,6 +918,4 @@ ammClawback(
return jv;
}
} // namespace amm
} // namespace jtx
} // namespace test
} // namespace xrpl
} // namespace xrpl::test::jtx