From 6efc333ffe4744c325a3b595b26427f144b658c3 Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Sat, 26 Aug 2017 16:36:46 +0300 Subject: Remove redundant explicitly defined copy ctors CFeeRate and CTxMemPoolEntry have explicitly defined copy ctors which has the same functionality as the implicit default copy ctors which would have been generated otherwise. Besides being redundant, it violates the rule of three (see https://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming) ). (Of course, the rule of three doesn't -really- cause a resource management issue here, but the reason for that is exactly that there is no need for an explicit copy ctor in the first place since no resources are being managed). CFeeRate has an explicitly defined copy ctor which has the same functionality as the implicit default copy ctor which would have been generated otherwise. ----------------------------- Cherry-picked from: b426e2467 Note: Solved conflict where upstream moved CFeeRate into ./policy/ whereas we still have it in amount.h/cpp on 1.14. --- src/txmempool.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/txmempool.cpp') diff --git a/src/txmempool.cpp b/src/txmempool.cpp index c6b679aec..bfb9e8519 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -45,11 +45,6 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFe nSigOpCostWithAncestors = sigOpCost; } -CTxMemPoolEntry::CTxMemPoolEntry(const CTxMemPoolEntry& other) -{ - *this = other; -} - double CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const { -- cgit v1.2.3