From 7015d609e80d4562547a947d508fd86c2e05145c Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:45:30 +0100 Subject: [PATCH] clang-tidy fixes Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> --- src/libxrpl/protocol/STAmount.cpp | 6 +++++- src/libxrpl/tx/Transactor.cpp | 1 - src/xrpld/app/misc/detail/TxQ.cpp | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libxrpl/protocol/STAmount.cpp b/src/libxrpl/protocol/STAmount.cpp index 4680781379..ef2468371e 100644 --- a/src/libxrpl/protocol/STAmount.cpp +++ b/src/libxrpl/protocol/STAmount.cpp @@ -837,15 +837,19 @@ STAmount::canonicalize() if (mAsset.holds() && mOffset > 18) Throw("MPT amount out of range"); - Number num(mIsNegative, mValue, mOffset, Number::unchecked{}); + Number const num(mIsNegative, mValue, mOffset, Number::unchecked{}); auto set = [&](auto const& val) { mIsNegative = val.value() < 0; mValue = mIsNegative ? -val.value() : val.value(); }; if (native()) + { set(XRPAmount{num}); + } else + { set(MPTAmount{num}); + } mOffset = 0; if (native() && mValue > cMaxNativeN) diff --git a/src/libxrpl/tx/Transactor.cpp b/src/libxrpl/tx/Transactor.cpp index 20ddcd3cb2..295ca9b8ab 100644 --- a/src/libxrpl/tx/Transactor.cpp +++ b/src/libxrpl/tx/Transactor.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/xrpld/app/misc/detail/TxQ.cpp b/src/xrpld/app/misc/detail/TxQ.cpp index fbabbb6ef8..ffa16e050f 100644 --- a/src/xrpld/app/misc/detail/TxQ.cpp +++ b/src/xrpld/app/misc/detail/TxQ.cpp @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include