From 5f091922c6b6bb7e619f8bdfdfc1f932b5e83f65 Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Mon, 23 Jan 2023 21:45:20 -0500 Subject: [PATCH] clang-format --- src/ripple/app/tx/impl/InvariantCheck.cpp | 24 +++++++++++------------ src/ripple/ledger/View.h | 10 ++++------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/ripple/app/tx/impl/InvariantCheck.cpp b/src/ripple/app/tx/impl/InvariantCheck.cpp index 5b49f1e48..a777cdbdb 100644 --- a/src/ripple/app/tx/impl/InvariantCheck.cpp +++ b/src/ripple/app/tx/impl/InvariantCheck.cpp @@ -100,13 +100,13 @@ XRPNotCreated::visitEntry( break; case ltPAYCHAN: if (isXRP((*before)[sfAmount])) - drops_ -= - ((*before)[sfAmount] - (*before)[sfBalance]).xrp().drops(); + drops_ -= ((*before)[sfAmount] - (*before)[sfBalance]) + .xrp() + .drops(); break; case ltESCROW: if (isXRP((*before)[sfAmount])) - drops_ -= - (*before)[sfAmount].xrp().drops(); + drops_ -= (*before)[sfAmount].xrp().drops(); break; default: break; @@ -122,13 +122,13 @@ XRPNotCreated::visitEntry( break; case ltPAYCHAN: if (!isDelete && isXRP((*after)[sfAmount])) - drops_ += - ((*after)[sfAmount] - (*after)[sfBalance]).xrp().drops(); + drops_ += ((*after)[sfAmount] - (*after)[sfBalance]) + .xrp() + .drops(); break; case ltESCROW: if (!isDelete && isXRP((*after)[sfAmount])) - drops_ += - (*after)[sfAmount].xrp().drops(); + drops_ += (*after)[sfAmount].xrp().drops(); break; default: break; @@ -295,15 +295,15 @@ NoZeroEscrow::finalize( beast::Journal const& j) { // bypass this invariant check for IOU escrows - if (bad_ && - rv.rules().enabled(featurePaychanAndEscrowForTokens) && + if (bad_ && rv.rules().enabled(featurePaychanAndEscrowForTokens) && txn.isFieldPresent(sfTransactionType)) { uint16_t tt = txn.getFieldU16(sfTransactionType); if (tt == ttESCROW_CANCEL || tt == ttESCROW_FINISH) return true; - - if (txn.isFieldPresent(sfAmount) && !isXRP(txn.getFieldAmount(sfAmount))) + + if (txn.isFieldPresent(sfAmount) && + !isXRP(txn.getFieldAmount(sfAmount))) return true; } diff --git a/src/ripple/ledger/View.h b/src/ripple/ledger/View.h index 5efece528..5e672e5aa 100644 --- a/src/ripple/ledger/View.h +++ b/src/ripple/ledger/View.h @@ -948,9 +948,8 @@ trustTransferLockedBalance( // yes we can... we will - auto const finalDstAmt = isIssuer ? dstAmt - : flipDstAmt ? -dstAmt - : dstAmt; + auto const finalDstAmt = + isIssuer ? dstAmt : flipDstAmt ? -dstAmt : dstAmt; if constexpr (!dryRun) { // clang-format off @@ -1008,9 +1007,8 @@ trustTransferLockedBalance( if (!isAddable(priorBalance, dstAmt)) return tecPRECISION_LOSS; - finalBalance = isIssuer ? -finalBalance - : dstHigh ? -finalBalance - : finalBalance; + finalBalance = + isIssuer ? -finalBalance : dstHigh ? -finalBalance : finalBalance; if constexpr (!dryRun) sleDstLine->setFieldAmount(sfBalance, finalBalance); }