Merged
Conversation
Merged
axic
reviewed
Aug 25, 2017
| @@ -97,33 +89,14 @@ class FixedHash | |||
| bool operator==(FixedHash const& _c) const { return m_data == _c.m_data; } | |||
| bool operator!=(FixedHash const& _c) const { return m_data != _c.m_data; } | |||
| bool operator<(FixedHash const& _c) const { for (unsigned i = 0; i < N; ++i) if (m_data[i] < _c.m_data[i]) return true; else if (m_data[i] > _c.m_data[i]) return false; return false; } | |||
Contributor
There was a problem hiding this comment.
Please add the comment that this is needed for map.
axic
reviewed
Aug 25, 2017
libdevcore/FixedHash.h
Outdated
| std::string abridged() const { return toHex(ref().cropped(0, 4)) + "\342\200\246"; } | ||
|
|
||
| /// @returns a version of the hash as a user-readable hex string that leaves out the middle part. | ||
| std::string abridgedMiddle() const { return toHex(ref().cropped(0, 4)) + "\342\200\246" + toHex(ref().cropped(N - 4)); } |
Contributor
Author
There was a problem hiding this comment.
This is used in the AST printer to shorten a hash.
Contributor
There was a problem hiding this comment.
We can consider replacing that without a shorted version in a different PR then.
fc87fdb to
7866da8
Compare
axic
approved these changes
Aug 25, 2017
7866da8 to
04cd237
Compare
04cd237 to
82e4f6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #2808