Paweł Bylica
8 years ago
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with
1 additions and
4 deletions
-
libdevcore/FixedHash.h
|
|
@ -50,9 +50,6 @@ public: |
|
|
|
/// A dummy flag to avoid accidental construction from pointer.
|
|
|
|
enum ConstructFromPointerType { ConstructFromPointer }; |
|
|
|
|
|
|
|
/// Method to convert from a string.
|
|
|
|
enum ConstructFromStringType { FromHex, FromBinary }; |
|
|
|
|
|
|
|
/// Method to convert from a string.
|
|
|
|
enum ConstructFromHashType { AlignLeft, AlignRight, FailIfDifferent }; |
|
|
|
|
|
|
@ -78,7 +75,7 @@ public: |
|
|
|
explicit FixedHash(byte const* _bs, ConstructFromPointerType) { memcpy(m_data.data(), _bs, N); } |
|
|
|
|
|
|
|
/// Explicitly construct, copying from a string.
|
|
|
|
explicit FixedHash(std::string const& _s, ConstructFromStringType _t = FromHex, ConstructFromHashType _ht = FailIfDifferent): FixedHash(_t == FromHex ? fromHex(_s, WhenError::Throw) : dev::asBytes(_s), _ht) {} |
|
|
|
explicit FixedHash(std::string const& _s): FixedHash(fromHex(_s, WhenError::Throw), FailIfDifferent) {} |
|
|
|
|
|
|
|
/// Convert to arithmetic type.
|
|
|
|
operator Arith() const { return fromBigEndian<Arith>(m_data); } |
|
|
|