Conversation
arogge
approved these changes
Sep 16, 2020
Member
arogge
left a comment
There was a problem hiding this comment.
I have just some minor remarks. The whole edit.cc would probably benefit a lot if it was redesigned completely.
| 1}; | ||
|
|
||
| if (value == 0) { | ||
| result += "0"; |
|
|
||
| std::string PrintNumberSiPrefixFormat(ResourceItem* item, uint64_t value_in) | ||
| { | ||
| PoolMem temp; |
Member
There was a problem hiding this comment.
this function will probably yield an unused parameter warning on compile.
You could just use ResourceItem* (without a parameter name) to identify the value as unused.
Probably it is even better to remove this function completely and replace with SizeAsSiPrefixFormat() where applicable.
| { | ||
| char str[] = "1 k"; | ||
| uint64_t retvalue = 0; | ||
| size_to_uint64(str, &retvalue); |
Member
There was a problem hiding this comment.
changing size_to_uint64(char*, uint64_t*) into size_to_uint64(const char*, uint64_t*) should be rather trivial and would allow to pass constant strings.
Member
|
I just looked at the code, but didn't test it. |
Co-authored-by: Andreas Rogge <andreas.rogge@bareos.com>
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.
The configuratoin parser now additionally allows the following modifiers:
t 1,099,511,627,776 (tebibytes)
tb 1,000,000,000,000 (terabytes)
p 1,125,899,906,842,624 (pebibytes)
pb 1,000,000,000,000,000 (petabytes)
e 1,152,921,504,606,846,976 (exbibytes)
eb 1,000,000,000,000,000,000 (exabytes)