Page MenuHomePhabricator

Fix deprecated copy warning for PrecomputedTransactionData
ClosedPublic

Authored by Fabien on May 28 2020, 11:14.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_warning_deprectated_copy_precomputed_transaction_data
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11061
Build 20516: Default Diff Build & Tests
Build 20515: Build without Wallet
Build 20514: Build with clang-10
Build 20513: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.May 28 2020, 11:14
This revision is now accepted and ready to land.May 28 2020, 12:29