chore: Enable clang-tidy misc checks (#6655)

This commit is contained in:
Alex Kremer
2026-03-31 18:29:45 +01:00
committed by GitHub
parent c3fae847f3
commit 2502befb42
469 changed files with 3915 additions and 3965 deletions

View File

@@ -199,7 +199,7 @@ class TheoreticalQuality_test : public beast::unit_test::suite
prettyQuality(Quality const& q)
{
std::stringstream sstr;
STAmount rate = q.rate();
STAmount const rate = q.rate();
sstr << rate << " (" << q << ")";
return sstr.str();
};
@@ -220,7 +220,7 @@ class TheoreticalQuality_test : public beast::unit_test::suite
std::shared_ptr<ReadView const> closed,
std::optional<Quality> const& expectedQ = {})
{
PaymentSandbox sb(closed.get(), tapNONE);
PaymentSandbox const sb(closed.get(), tapNONE);
AMMContext ammContext(rcp.srcAccount, false);
auto const sendMaxIssue = [&rcp]() -> std::optional<Issue> {
@@ -229,7 +229,7 @@ class TheoreticalQuality_test : public beast::unit_test::suite
return std::nullopt;
}();
beast::Journal dummyJ{beast::Journal::getNullSink()};
beast::Journal const dummyJ{beast::Journal::getNullSink()};
auto sr = toStrands(
sb,
@@ -366,7 +366,7 @@ public:
// Accounts are set up, make the payment
IOU const iou{accounts.back(), currency};
RippleCalcTestParams rcp{env.json(
RippleCalcTestParams const rcp{env.json(
pay(accounts.front(), accounts.back(), iou(paymentAmount)),
accountsPath,
txflags(tfNoRippleDirect))};
@@ -413,7 +413,7 @@ public:
auto const USDB = bob["USD"];
auto const EURC = carol["EUR"];
constexpr std::size_t const numAccounts = 5;
std::array<Account, numAccounts> accounts{{alice, bob, carol, dan, oscar}};
std::array<Account, numAccounts> const accounts{{alice, bob, carol, dan, oscar}};
// sendmax should be in USDB and delivered amount should be in EURC
// normalized path should be:
@@ -445,7 +445,7 @@ public:
// Accounts are set up, make the payment
IOU const srcIOU{bob, usdCurrency};
IOU const dstIOU{carol, eurCurrency};
RippleCalcTestParams rcp{env.json(
RippleCalcTestParams const rcp{env.json(
pay(alice, dan, dstIOU(paymentAmount)),
sendmax(srcIOU(100 * paymentAmount)),
bookPath,