From 64fb0ac016c7fd01c60c39af60f6431bac57f9ee Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 1 Aug 2017 12:22:41 +0200 Subject: Declare single-argument (non-converting) constructors "explicit" In order to avoid unintended implicit conversions. --- src/txdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/txdb.cpp') diff --git a/src/txdb.cpp b/src/txdb.cpp index 4c1b04cd9..797ae5713 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -35,7 +35,7 @@ namespace { struct CoinEntry { COutPoint* outpoint; char key; - CoinEntry(const COutPoint* ptr) : outpoint(const_cast(ptr)), key(DB_COIN) {} + explicit CoinEntry(const COutPoint* ptr) : outpoint(const_cast(ptr)), key(DB_COIN) {} template void Serialize(Stream &s) const { -- cgit v1.2.3