Merge #13769: Mark single-argument constructors "explicit"

1ac3c983bf Mark single-argument constructors "explicit" (practicalswift)

Pull request description:

  Mark single-argument constructors `explicit`.

  Rationale:
  * Avoid unexpected implicit promotions.

  From the developer notes:

  > **By default, declare single-argument constructors explicit.**
  > Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions.

Tree-SHA512: 7901ed5be808c9d0ecb5ca501e1bc0395987fe1b7941b8548cebac2ff08a14f7dab61fab374a69b9ba29a9295a04245c814325c7f95b97ae558af0780f111dfa
This commit is contained in:
MarcoFalke
2018-08-27 13:32:59 -04:00
8 changed files with 9 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ private:
const CChainParams& m_params;
public:
DestinationEncoder(const CChainParams& params) : m_params(params) {}
explicit DestinationEncoder(const CChainParams& params) : m_params(params) {}
std::string operator()(const CKeyID& id) const
{