mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -27,7 +27,7 @@ protected:
|
||||
size_type nMaxSize;
|
||||
|
||||
public:
|
||||
limitedmap(size_type nMaxSizeIn)
|
||||
explicit limitedmap(size_type nMaxSizeIn)
|
||||
{
|
||||
assert(nMaxSizeIn > 0);
|
||||
nMaxSize = nMaxSizeIn;
|
||||
|
||||
Reference in New Issue
Block a user