mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Mark single-argument constructors "explicit"
This commit is contained in:
@@ -29,7 +29,7 @@ BOOST_FIXTURE_TEST_SUITE(miner_tests, TestingSetup)
|
||||
// BOOST_CHECK_EXCEPTION predicates to check the specific validation error
|
||||
class HasReason {
|
||||
public:
|
||||
HasReason(const std::string& reason) : m_reason(reason) {}
|
||||
explicit HasReason(const std::string& reason) : m_reason(reason) {}
|
||||
bool operator() (const std::runtime_error& e) const {
|
||||
return std::string(e.what()).find(m_reason) != std::string::npos;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user