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:
@@ -39,7 +39,7 @@ public:
|
||||
};
|
||||
typedef unsigned char MessageStartChars[MESSAGE_START_SIZE];
|
||||
|
||||
CMessageHeader(const MessageStartChars& pchMessageStartIn);
|
||||
explicit CMessageHeader(const MessageStartChars& pchMessageStartIn);
|
||||
CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn);
|
||||
|
||||
std::string GetCommand() const;
|
||||
|
||||
Reference in New Issue
Block a user