From e92dbc8fce39e3bd767a1c51ebe4bc806056a646 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:30:17 +0100 Subject: [PATCH] style: clang-tidy auto fixes (#2264) Fixes #2263. Please review and commit clang-tidy fixes. Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com> --- src/rpc/handlers/GatewayBalances.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rpc/handlers/GatewayBalances.cpp b/src/rpc/handlers/GatewayBalances.cpp index f6b02280..41996fab 100644 --- a/src/rpc/handlers/GatewayBalances.cpp +++ b/src/rpc/handlers/GatewayBalances.cpp @@ -82,20 +82,20 @@ GatewayBalancesHandler::process(GatewayBalancesHandler::Input input, Context con auto addEscrow = [&](ripple::SLE const& sle) { if (sle.getType() == ripple::ltESCROW) { auto const& escrow = sle.getFieldAmount(ripple::sfAmount); - auto& locked_balance = output.locked[escrow.getCurrency()]; - if (locked_balance == beast::zero) { + auto& lockedBalance = output.locked[escrow.getCurrency()]; + if (lockedBalance == beast::zero) { // This is needed to set the currency code correctly - locked_balance = escrow; + lockedBalance = escrow; } else { try { - locked_balance += escrow; + lockedBalance += escrow; } catch (std::runtime_error const&) { // Presumably the exception was caused by overflow. // On overflow return the largest valid STAmount. // Very large sums of STAmount are approximations // anyway. - locked_balance = ripple::STAmount( - locked_balance.issue(), ripple::STAmount::cMaxValue, ripple::STAmount::cMaxOffset + lockedBalance = ripple::STAmount( + lockedBalance.issue(), ripple::STAmount::cMaxValue, ripple::STAmount::cMaxOffset ); } }