From cab82cfe183e72c0867a493c349b166e07eaa7f7 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 22 Jul 2018 09:38:00 -0400 Subject: [PATCH] Merge #13691: Remove redundant variables, statements and forward declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3dee4cc509 Remove redundant statement (practicalswift) 99be644966 Remove redundant unused variables (practicalswift) 66ed242343 Remove redundant forward declaration (practicalswift) Pull request description: Remove redundant … * ~access modifiers,~ * forward declarations, * unused variables, * statements, and * ~return types from lambdas.~ Tree-SHA512: 328bb7d9c45398e44ecbee32095b6376879470dfddbc2180e037620d8390d524b51d7fda112fd58a078715e04432b24dd6998a2459f3550aa0498aa68de866d4 --- src/qt/clientmodel.cpp | 2 -- src/test/miner_tests.cpp | 2 +- src/txmempool.cpp | 1 - src/wallet/coinselection.cpp | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 1d15b47fe4..3ab3b1c70b 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -28,8 +28,6 @@ #include #include -class CBlockIndex; - static int64_t nLastHeaderTipUpdateNotification = 0; static int64_t nLastBlockTipUpdateNotification = 0; diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 63cf5512ee..5b7f2e9d67 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -215,7 +215,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) const CChainParams& chainparams = *chainParams; CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG; std::unique_ptr pblocktemplate, pemptyblocktemplate; - CMutableTransaction tx,tx2; + CMutableTransaction tx; CScript script; uint256 hash; TestMemPoolEntryHelper entry; diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 3b01199834..a92bbcd724 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1109,7 +1109,6 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const while (!waitingOnDependants.empty()) { const CTxMemPoolEntry* entry = waitingOnDependants.front(); waitingOnDependants.pop_front(); - CValidationState state; if (!mempoolDuplicate.HaveInputs(entry->GetTx())) { waitingOnDependants.push_back(entry); stepsSinceLastRemove++; diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp index 576485bc57..6a0b295278 100644 --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -117,7 +117,7 @@ bool SelectCoinsBnB(std::vector& utxo_pool, const CAmount& target_va while (!curr_selection.empty() && !curr_selection.back()) { curr_selection.pop_back(); curr_available_value += utxo_pool.at(curr_selection.size()).effective_value; - }; + } if (curr_selection.empty()) { // We have walked back to the first utxo and no branch is untraversed. All solutions searched break;