HomePhabricator

Make Amount trivially copyable

Description

Make Amount trivially copyable

Summary:
There is no need for a user-provided copy constructor in Amount. Removing it makes the class trivially-copyable, which allows to use std::atomic<Amount>.

See https://en.cppreference.com/w/cpp/language/classes#Trivially_copyable_class

Remove also the assignement operator operator=( which was only defined to remove a deprecation warning for implicit assignement operators with explicit copy-constructors (D3963)

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Mar 10 2023, 12:26
PiRKPushed on Mar 10 2023, 14:40
Reviewer
Restricted Project
Differential Revision
D13270: Make Amount trivially copyable
Parents
rABC94af4aec7d60: [ecash-telegram-bot] Add etoken and genesis tx info in block msgs
Branches
Unknown
Tags
Unknown