diff options
author | chriseth <chris@ethereum.org> | 2017-08-22 18:43:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 18:43:19 +0800 |
commit | f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4 (patch) | |
tree | fb0f04a445940004a8a45e03bc98d149c5cc71a7 /libdevcore/FixedHash.h | |
parent | 2c2ae74217521aae93b9c7b058ce8687046c648c (diff) | |
parent | 9897c56b2cacf162f8fd41d60e91b7f71863f8d5 (diff) | |
download | dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar.gz dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar.bz2 dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar.lz dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar.xz dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.tar.zst dexon-solidity-f874fc28d1cb657b6d4e04fa9d93bd8d061f30c4.zip |
Merge pull request #2772 from ethereum/cppcheck
Improvements found by Cppcheck (const/static functions and explicit constructors)
Diffstat (limited to 'libdevcore/FixedHash.h')
-rw-r--r-- | libdevcore/FixedHash.h | 2 |
1 files changed, 1 insertions, 1 deletions
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]; } |