From d6ae890f8372902fb564b8d7bef8d233bdc2713e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:49:07 +0100 Subject: [PATCH] style: clang-tidy auto fixes (#1546) Fixes #1545. Please review and commit clang-tidy fixes. Co-authored-by: kuznetsss --- src/data/CassandraBackend.hpp | 5 ++--- src/rpc/common/Validators.cpp | 1 - src/rpc/handlers/GetAggregatePrice.cpp | 1 - src/rpc/handlers/LedgerEntry.cpp | 3 +-- tests/common/util/TestObject.cpp | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/data/CassandraBackend.hpp b/src/data/CassandraBackend.hpp index 62852064..f18ac595 100644 --- a/src/data/CassandraBackend.hpp +++ b/src/data/CassandraBackend.hpp @@ -576,9 +576,8 @@ public: if (auto const result = res->template get(); result) { auto [_ ,seq] = result.value(); return seq; - } else { - LOG(log_.debug()) << "Could not fetch ledger object sequence - no rows"; - } + } LOG(log_.debug()) << "Could not fetch ledger object sequence - no rows"; + } else { LOG(log_.error()) << "Could not fetch ledger object sequence: " << res.error(); } diff --git a/src/rpc/common/Validators.cpp b/src/rpc/common/Validators.cpp index fc75f692..bfb70f04 100644 --- a/src/rpc/common/Validators.cpp +++ b/src/rpc/common/Validators.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/rpc/handlers/GetAggregatePrice.cpp b/src/rpc/handlers/GetAggregatePrice.cpp index 31b9f6c7..2aac52ce 100644 --- a/src/rpc/handlers/GetAggregatePrice.cpp +++ b/src/rpc/handlers/GetAggregatePrice.cpp @@ -46,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/src/rpc/handlers/LedgerEntry.cpp b/src/rpc/handlers/LedgerEntry.cpp index 21411909..78096262 100644 --- a/src/rpc/handlers/LedgerEntry.cpp +++ b/src/rpc/handlers/LedgerEntry.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -174,7 +173,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input input, Context const& ctx) ledgerObject = sharedPtrBackend_->fetchLedgerObject(key, deletedSeq.value() - 1, ctx.yield); if (!ledgerObject || ledgerObject->empty()) return Error{Status{"entryNotFound"}}; - output.deletedLedgerIndex = deletedSeq.value(); + output.deletedLedgerIndex = deletedSeq; } ripple::STLedgerEntry const sle{ripple::SerialIter{ledgerObject->data(), ledgerObject->size()}, key}; diff --git a/tests/common/util/TestObject.cpp b/tests/common/util/TestObject.cpp index 538d9428..29bc78f6 100644 --- a/tests/common/util/TestObject.cpp +++ b/tests/common/util/TestObject.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include