Remove redundant explicitly defined CTxMemPoolEntry copy ctor #11163

pull danra wants to merge 1 commits into bitcoin:master from danra:fix/redundant-CTxMemPoolEntry-copy-ctor changing 2 files +0 −7
  1. danra commented at 4:34 PM on August 26, 2017: contributor

    CTxMemPoolEntry has an explicitly defined copy ctor which has the same functionality as the implicit default copy ctor 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) ). 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.

  2. Remove redundant explicitly defined CTxMemPoolEntry copy ctor
    CTxMemPoolEntry has an explicitly defined copy ctor which has the same functionality as the implicit default copy ctor 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) ).
    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.
    43c49116be
  3. promag commented at 5:08 PM on August 26, 2017: member

    This is the same as #11161, maybe add this commit there and make the PR generic like Remove redundant explicitly defined copy constructor?

  4. danra commented at 6:03 PM on August 26, 2017: contributor

    Will merge into #11161.

  5. danra closed this on Aug 26, 2017

  6. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me