aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore
diff options
context:
space:
mode:
Diffstat (limited to 'libdevcore')
-rw-r--r--libdevcore/Common.h2
-rw-r--r--libdevcore/FixedHash.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libdevcore/Common.h b/libdevcore/Common.h
index d383e74d..9d6dd408 100644
--- a/libdevcore/Common.h
+++ b/libdevcore/Common.h
@@ -157,7 +157,7 @@ template <> inline u256 exp10<0>()
class ScopeGuard
{
public:
- ScopeGuard(std::function<void(void)> _f): m_f(_f) {}
+ explicit ScopeGuard(std::function<void(void)> _f): m_f(_f) {}
~ScopeGuard() { m_f(); }
private:
diff --git a/libdevcore/FixedHash.h b/libdevcore/FixedHash.h
index 5b1c7acf..1c37b675 100644
--- a/libdevcore/FixedHash.h
+++ b/libdevcore/FixedHash.h
@@ -59,7 +59,7 @@ public:
enum ConstructFromHashType { AlignLeft, AlignRight, FailIfDifferent };
/// Construct an empty hash.
- FixedHash() { m_data.fill(0); }
+ explicit FixedHash() { m_data.fill(0); }
/// Construct from another hash, filling with zeroes or cropping as necessary.
template <unsigned M> explicit FixedHash(FixedHash<M> const& _h, ConstructFromHashType _t = AlignLeft) { m_data.fill(0); unsigned c = std::min(M, N); for (unsigned i = 0; i < c; ++i) m_data[_t == AlignRight ? N - 1 - i : i] = _h[_t == AlignRight ? M - 1 - i : i]; }