From e029a9b3dfef7326fcb42ca3542b3f5e467f019a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:14:38 +0000 Subject: [PATCH] style: clang-tidy auto fixes (#1972) Fixes #1971. Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com> --- src/etl/impl/LedgerLoader.hpp | 2 +- src/etlng/impl/ext/Core.cpp | 1 - tests/integration/data/cassandra/BackendTests.cpp | 2 +- tests/unit/etlng/ext/CacheTests.cpp | 1 - tests/unit/etlng/ext/SuccessorTests.cpp | 14 ++++++-------- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/etl/impl/LedgerLoader.hpp b/src/etl/impl/LedgerLoader.hpp index e6d88ee8e..716fa8718 100644 --- a/src/etl/impl/LedgerLoader.hpp +++ b/src/etl/impl/LedgerLoader.hpp @@ -121,7 +121,7 @@ public: LOG(log_.trace()) << "Inserting transaction = " << sttx.getTransactionID(); - ripple::TxMeta txMeta{sttx.getTransactionID(), ledger.seq, txn.metadata_blob()}; + ripple::TxMeta const txMeta{sttx.getTransactionID(), ledger.seq, txn.metadata_blob()}; auto const [nftTxs, maybeNFT] = getNFTDataFromTx(txMeta, sttx); result.nfTokenTxData.insert(result.nfTokenTxData.end(), nftTxs.begin(), nftTxs.end()); diff --git a/src/etlng/impl/ext/Core.cpp b/src/etlng/impl/ext/Core.cpp index 2c3e141a0..fa2c3c9fa 100644 --- a/src/etlng/impl/ext/Core.cpp +++ b/src/etlng/impl/ext/Core.cpp @@ -23,7 +23,6 @@ #include "etlng/Models.hpp" #include "util/log/Logger.hpp" -#include #include #include diff --git a/tests/integration/data/cassandra/BackendTests.cpp b/tests/integration/data/cassandra/BackendTests.cpp index ffc03a48d..3fa0edc04 100644 --- a/tests/integration/data/cassandra/BackendTests.cpp +++ b/tests/integration/data/cassandra/BackendTests.cpp @@ -402,7 +402,7 @@ TEST_F(BackendCassandraTest, Basic) ripple::uint256 hash256; EXPECT_TRUE(hash256.parseHex(hashHex)); - ripple::TxMeta txMeta{hash256, lgrInfoNext.seq, metaBlob}; + ripple::TxMeta const txMeta{hash256, lgrInfoNext.seq, metaBlob}; auto accountsSet = txMeta.getAffectedAccounts(); for (auto& a : accountsSet) { affectedAccounts.push_back(a); diff --git a/tests/unit/etlng/ext/CacheTests.cpp b/tests/unit/etlng/ext/CacheTests.cpp index bdd15c747..c1697b6d1 100644 --- a/tests/unit/etlng/ext/CacheTests.cpp +++ b/tests/unit/etlng/ext/CacheTests.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/tests/unit/etlng/ext/SuccessorTests.cpp b/tests/unit/etlng/ext/SuccessorTests.cpp index 6828dd801..981afac5f 100644 --- a/tests/unit/etlng/ext/SuccessorTests.cpp +++ b/tests/unit/etlng/ext/SuccessorTests.cpp @@ -32,10 +32,8 @@ #include #include -#include #include #include -#include #include #include @@ -203,7 +201,7 @@ TEST_F( }); auto const bookBase = getBookBase(createdObj.key); - [[maybe_unused]] testing::InSequence inSeq; + [[maybe_unused]] testing::InSequence const inSeq; EXPECT_CALL(cache_, isFull()).WillRepeatedly(testing::Return(true)); EXPECT_CALL(cache_, latestLedgerSequence()).WillRepeatedly(testing::Return(kSEQ)); @@ -239,7 +237,7 @@ TEST_F( auto const bookBase = getBookBase(deletedObj.key); auto const oldCachedObj = createdObj.data; - [[maybe_unused]] testing::InSequence inSeq; + [[maybe_unused]] testing::InSequence const inSeq; EXPECT_CALL(cache_, isFull()).WillRepeatedly(testing::Return(true)); EXPECT_CALL(cache_, latestLedgerSequence()).WillRepeatedly(testing::Return(kSEQ)); @@ -273,7 +271,7 @@ TEST_F( auto const bookBase = getBookBase(deletedObj.key); auto const oldCachedObj = createdObj.data; - [[maybe_unused]] testing::InSequence inSeq; + [[maybe_unused]] testing::InSequence const inSeq; EXPECT_CALL(cache_, isFull()).WillRepeatedly(testing::Return(true)); EXPECT_CALL(cache_, latestLedgerSequence()).WillRepeatedly(testing::Return(kSEQ)); @@ -378,7 +376,7 @@ TEST_F(SuccessorExtTests, OnInitialDataWithSuccessorsButNotBookDirAndNoSuccessor successorChain.push(firstKey); successorChain.push(secondKey); - [[maybe_unused]] testing::Sequence inSeq; + [[maybe_unused]] testing::Sequence const inSeq; EXPECT_CALL(cache_, isFull()).WillOnce(testing::Return(true)); EXPECT_CALL(cache_, getSuccessor(testing::_, kSEQ)) @@ -417,7 +415,7 @@ TEST_F(SuccessorExtTests, OnInitialDataWithSuccessorsButNotBookDirAndSuccessorsF successorChain.push(firstKey); successorChain.push(secondKey); - [[maybe_unused]] testing::Sequence inSeq; + [[maybe_unused]] testing::Sequence const inSeq; EXPECT_CALL(cache_, isFull()).WillOnce(testing::Return(true)); EXPECT_CALL(cache_, getSuccessor(testing::_, kSEQ)) @@ -460,7 +458,7 @@ TEST_F(SuccessorExtTests, OnInitialDataWithSuccessorsAndBookDirAndSuccessorsForE auto const bookBaseObj = util::createObjectWithBookBase(Object::ModType::Created); auto const bookBase = getBookBase(bookBaseObj.key); - [[maybe_unused]] testing::Sequence inSeq; + [[maybe_unused]] testing::Sequence const inSeq; EXPECT_CALL(cache_, isFull()).WillOnce(testing::Return(true)); EXPECT_CALL(cache_, getSuccessor(testing::_, kSEQ))