From 91ad1ffc3b9b93c00ac78974879c01879b8a3c70 Mon Sep 17 00:00:00 2001 From: cyan317 <120398799+cindyyan317@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:32:29 +0100 Subject: [PATCH] Fix error "readability-else-after-return" (#905) Fix compile error --- src/rpc/handlers/AccountTx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/handlers/AccountTx.cpp b/src/rpc/handlers/AccountTx.cpp index c79b22dc6..81eeb423b 100644 --- a/src/rpc/handlers/AccountTx.cpp +++ b/src/rpc/handlers/AccountTx.cpp @@ -108,7 +108,8 @@ AccountTxHandler::process(AccountTxHandler::Input input, Context const& ctx) con { return Error{Status{RippledError::rpcINVALID_PARAMS, "containsLedgerSpecifierAndRange"}}; } - else if (!input.ledgerIndexMax && !input.ledgerIndexMin) + + if (!input.ledgerIndexMax && !input.ledgerIndexMin) { // mimic rippled, when both range and index specified, respect the range. // take ledger from ledgerHash or ledgerIndex only when range is not specified