Page MenuHomePhabricator

Remove redundant explicitly defined copy ctors
ClosedPublic

Authored by Fabien on Dec 29 2018, 18:08.

Details

Summary

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.

Backport of core PR11161

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR11161
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4382
Build 6829: Bitcoin ABC Buildbot (legacy)
Build 6828: arc lint + arc unit