mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-28 18:19:31 +01:00
Add Travis check for single parameter constructors not marked "explicit"
This commit is contained in:
@@ -53,7 +53,7 @@ struct DBHeightKey {
|
||||
int height;
|
||||
|
||||
DBHeightKey() : height(0) {}
|
||||
DBHeightKey(int height_in) : height(height_in) {}
|
||||
explicit DBHeightKey(int height_in) : height(height_in) {}
|
||||
|
||||
template<typename Stream>
|
||||
void Serialize(Stream& s) const
|
||||
@@ -76,7 +76,7 @@ struct DBHeightKey {
|
||||
struct DBHashKey {
|
||||
uint256 hash;
|
||||
|
||||
DBHashKey(const uint256& hash_in) : hash(hash_in) {}
|
||||
explicit DBHashKey(const uint256& hash_in) : hash(hash_in) {}
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
class RpcHandlerImpl : public Handler
|
||||
{
|
||||
public:
|
||||
RpcHandlerImpl(const CRPCCommand& command) : m_command(command), m_wrapped_command(&command)
|
||||
explicit RpcHandlerImpl(const CRPCCommand& command) : m_command(command), m_wrapped_command(&command)
|
||||
{
|
||||
m_command.actor = [this](const JSONRPCRequest& request, UniValue& result, bool last_handler) {
|
||||
if (!m_wrapped_command) return false;
|
||||
|
||||
@@ -221,7 +221,7 @@ struct RPCResults {
|
||||
|
||||
struct RPCExamples {
|
||||
const std::string m_examples;
|
||||
RPCExamples(
|
||||
explicit RPCExamples(
|
||||
std::string examples)
|
||||
: m_examples(std::move(examples))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user