mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Merge #17349: Remove redundant copy constructors
fa8919889f
bench: Remove redundant copy constructor in mempool_stress (MarcoFalke)29f8434368
refactor: Remove redundant PSBT copy constructor (Hennadii Stepanov) Pull request description: I fail to see why people add these copy constructors manually without explanation, when the compiler can generate them at least as good automatically with less code. ACKs for top commit: promag: ACKfa8919889f
. hebasto: ACKfa8919889f
, nit s/constructor/operator/ in commitfa8919889f
message, as @promag [mentioned](https://github.com/bitcoin/bitcoin/pull/17349#discussion_r341776389) above. jonatack: ACKfa8919889f
Tree-SHA512: ce024fdb894328f41037420b881169b8b1b48c87fbae5f432edf371a35c82e77e21468ef97cda6f54d34f1cf9bb010235d62904bb0669793457ed1c3b2a89723
This commit is contained in:
commit
fba574c908
2 changed files with 1 additions and 8 deletions
|
@ -23,12 +23,6 @@ struct Available {
|
||||||
size_t vin_left{0};
|
size_t vin_left{0};
|
||||||
size_t tx_count;
|
size_t tx_count;
|
||||||
Available(CTransactionRef& ref, size_t tx_count) : ref(ref), tx_count(tx_count){}
|
Available(CTransactionRef& ref, size_t tx_count) : ref(ref), tx_count(tx_count){}
|
||||||
Available& operator=(Available other) {
|
|
||||||
ref = other.ref;
|
|
||||||
vin_left = other.vin_left;
|
|
||||||
tx_count = other.tx_count;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ComplexMemPool(benchmark::State& state)
|
static void ComplexMemPool(benchmark::State& state)
|
||||||
|
|
|
@ -401,7 +401,6 @@ struct PartiallySignedTransaction
|
||||||
bool AddInput(const CTxIn& txin, PSBTInput& psbtin);
|
bool AddInput(const CTxIn& txin, PSBTInput& psbtin);
|
||||||
bool AddOutput(const CTxOut& txout, const PSBTOutput& psbtout);
|
bool AddOutput(const CTxOut& txout, const PSBTOutput& psbtout);
|
||||||
PartiallySignedTransaction() {}
|
PartiallySignedTransaction() {}
|
||||||
PartiallySignedTransaction(const PartiallySignedTransaction& psbt_in) : tx(psbt_in.tx), inputs(psbt_in.inputs), outputs(psbt_in.outputs), unknown(psbt_in.unknown) {}
|
|
||||||
explicit PartiallySignedTransaction(const CMutableTransaction& tx);
|
explicit PartiallySignedTransaction(const CMutableTransaction& tx);
|
||||||
/**
|
/**
|
||||||
* Finds the UTXO for a given input index
|
* Finds the UTXO for a given input index
|
||||||
|
|
Loading…
Add table
Reference in a new issue