From b426e24678eb65d791cb505011e3ba4655aef1cd 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 h ave been generated otherwise. --- src/policy/feerate.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/policy/feerate.h') diff --git a/src/policy/feerate.h b/src/policy/feerate.h index 565da6c154..7e519e3efa 100644 --- a/src/policy/feerate.h +++ b/src/policy/feerate.h @@ -26,7 +26,6 @@ public: explicit CFeeRate(const CAmount& _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { } /** Constructor for a fee rate in satoshis per kB. The size in bytes must not exceed (2^63 - 1)*/ CFeeRate(const CAmount& nFeePaid, size_t nBytes); - CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; } /** * Return the fee in satoshis for the given size in bytes. */ -- cgit v1.2.3