aboutsummaryrefslogtreecommitdiff
path: root/src/undo.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-01 12:22:41 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-16 16:33:25 +0200
commit64fb0ac016c7fd01c60c39af60f6431bac57f9ee (patch)
tree8d8523dd68167f9a6299dd92cc9dd5e0fd162b23 /src/undo.h
parent22e301a3d56dc9e6878380ee92c7d19ca43119d2 (diff)
downloadbitcoin-64fb0ac016c7fd01c60c39af60f6431bac57f9ee.tar.xz
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
Diffstat (limited to 'src/undo.h')
-rw-r--r--src/undo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/undo.h b/src/undo.h
index 0f9d041bbd..a720de4ac5 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -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);