mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 12:03:04 +02:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
class CNetMsgMaker
|
||||
{
|
||||
public:
|
||||
CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn){}
|
||||
explicit CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn){}
|
||||
|
||||
template <typename... Args>
|
||||
CSerializedNetMsg Make(int nFlags, std::string sCommand, Args&&... args) const
|
||||
|
Reference in New Issue
Block a user