mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 03:23:43 +02:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -33,7 +33,7 @@ struct CBlockTemplate
|
||||
// Container for tracking updates to ancestor feerate as we include (parent)
|
||||
// transactions in a block
|
||||
struct CTxMemPoolModifiedEntry {
|
||||
CTxMemPoolModifiedEntry(CTxMemPool::txiter entry)
|
||||
explicit CTxMemPoolModifiedEntry(CTxMemPool::txiter entry)
|
||||
{
|
||||
iter = entry;
|
||||
nSizeWithAncestors = entry->GetSizeWithAncestors();
|
||||
@@ -116,7 +116,7 @@ typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator
|
||||
|
||||
struct update_for_parent_inclusion
|
||||
{
|
||||
update_for_parent_inclusion(CTxMemPool::txiter it) : iter(it) {}
|
||||
explicit update_for_parent_inclusion(CTxMemPool::txiter it) : iter(it) {}
|
||||
|
||||
void operator() (CTxMemPoolModifiedEntry &e)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
CFeeRate blockMinFeeRate;
|
||||
};
|
||||
|
||||
BlockAssembler(const CChainParams& params);
|
||||
explicit BlockAssembler(const CChainParams& params);
|
||||
BlockAssembler(const CChainParams& params, const Options& options);
|
||||
|
||||
/** Construct a new block template with coinbase to scriptPubKeyIn */
|
||||
|
Reference in New Issue
Block a user