HomePhabricator

Fix deprecated copy warning for PrecomputedTransactionData

Description

Fix deprecated copy warning for PrecomputedTransactionData

Summary:
This fixes this kind of warning by enforcing the default copy
constructor, since the behavior is the same:

../src/./primitives/transaction.h:354:5: warning: definition of implicit
copy assignment operator for 'PrecomputedTransactionData' is deprecated
because it has a user-declared copy constructor [-Wdeprecated-copy]
    PrecomputedTransactionData(const PrecomputedTransactionData &txdata)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../include/c++/10.1.0/bits/move.h:198:11:
note: in implicit copy assignment operator for
'PrecomputedTransactionData' first required here
      __a = _GLIBCXX_MOVE(__b);
          ^
../src/./validation.h:616:14: note: in instantiation of function
template specialization 'std::swap<PrecomputedTransactionData>'
requested here
        std::swap(txdata, check.txdata);

Test Plan:
With clang as a compiler (tested with clang 10.0.0):

ninja check

Check the warnings are gone.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6276

Details

Provenance
FabienAuthored on May 28 2020, 11:07
FabienPushed on May 28 2020, 12:48
Reviewer
Restricted Project
Differential Revision
D6276: Fix deprecated copy warning for PrecomputedTransactionData
Parents
rABCba85dd611645: Fix shadow warning
Branches
Unknown
Tags
Unknown