aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorDan Raviv <dan@soundradix.com>2017-08-26 16:36:46 +0300
committerDan Raviv <dan@soundradix.com>2017-08-28 01:29:48 +0300
commitb426e24678eb65d791cb505011e3ba4655aef1cd (patch)
treeeb76718af998f0eb41aa20ce82fb51365222bb71 /src/txmempool.cpp
parent7fd49d01dc2ea444ba4d81d0cfa17486b03c8515 (diff)
downloadbitcoin-b426e24678eb65d791cb505011e3ba4655aef1cd.tar.xz
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 h ave been generated otherwise.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 4a81055231..f68d677646 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -39,11 +39,6 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFe
nSigOpCostWithAncestors = sigOpCost;
}
-CTxMemPoolEntry::CTxMemPoolEntry(const CTxMemPoolEntry& other)
-{
- *this = other;
-}
-
void CTxMemPoolEntry::UpdateFeeDelta(int64_t newFeeDelta)
{
nModFeesWithDescendants += newFeeDelta - feeDelta;