mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -33,7 +33,7 @@ public:
|
||||
::Serialize(s, CTxOutCompressor(REF(txout->out)));
|
||||
}
|
||||
|
||||
TxInUndoSerializer(const Coin* coin) : txout(coin) {}
|
||||
explicit TxInUndoSerializer(const Coin* coin) : txout(coin) {}
|
||||
};
|
||||
|
||||
class TxInUndoDeserializer
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
::Unserialize(s, REF(CTxOutCompressor(REF(txout->out))));
|
||||
}
|
||||
|
||||
TxInUndoDeserializer(Coin* coin) : txout(coin) {}
|
||||
explicit TxInUndoDeserializer(Coin* coin) : txout(coin) {}
|
||||
};
|
||||
|
||||
static const size_t MIN_TRANSACTION_INPUT_WEIGHT = WITNESS_SCALE_FACTOR * ::GetSerializeSize(CTxIn(), SER_NETWORK, PROTOCOL_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user