Remove trailing zeros from the output of BytesUtils::formatBytes#7538
Merged
chriseth merged 2 commits intoargotorg:developfrom Oct 16, 2019
Merged
Remove trailing zeros from the output of BytesUtils::formatBytes#7538chriseth merged 2 commits intoargotorg:developfrom
chriseth merged 2 commits intoargotorg:developfrom
Conversation
erak
reviewed
Oct 16, 2019
|
|
||
| /// Formats this function call test and applies the format that was detected during parsing. | ||
| /// If _renderResult is false, the expected result of the call will is used, if it's false | ||
| /// If _renderResult is false, the expected result of the call will be used, if it's true |
erak
reviewed
Oct 16, 2019
test/libsolidity/util/BytesUtils.cpp
Outdated
| case ABIType::String: | ||
| os << formatString(_bytes); | ||
| { | ||
| auto paddingZerosCnt = find_if( |
Collaborator
There was a problem hiding this comment.
I think it would be better to move this into its own function and then call it from here.
Collaborator
There was a problem hiding this comment.
Maybe BytesUtils::countRightPaddedZeros?
erak
requested changes
Oct 16, 2019
Collaborator
erak
left a comment
There was a problem hiding this comment.
Thanks for submitting this PR. In general it looks good but I still left a tiny request for change.
b7634b1 to
8a8f553
Compare
erak
approved these changes
Oct 16, 2019
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.
Closes #7198