fixed #6316 (Use std::to_string() in place of MathLib::toString() ...) - deleted default implementation of Mathlib::toString()#5341
Merged
chrchr-github merged 2 commits intocppcheck-opensource:mainfrom Aug 17, 2023
Conversation
Collaborator
Author
|
I started these changes separately before I spotted Roberts ticket by accident. Since the changes were just a superset of what he did I credited him as well. |
firewave
commented
Aug 17, 2023
| ASSERT_EQUALS("0.0", MathLib::toString(0.0)); | ||
| ASSERT_EQUALS("0.0", MathLib::toString(+0.0)); | ||
| ASSERT_EQUALS("0.0", MathLib::toString(-0.0)); | ||
| // float (trailing f or F) |
Collaborator
Author
There was a problem hiding this comment.
Since we did not have a specialization for float and long double these were actually using the default implementation which is probably not what we wanted. Since we do not use those types in the code these tests could be removed and no further specializations were necessary to implement.
…ts for non-existing specializations Co-authored-by: Robert Reif <reif@earthlink.net>
Co-authored-by: Robert Reif <reif@earthlink.net>
f916cf3 to
95d1b4f
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.
It was also used inconsistently and seemed to imply there is some special handling which wasn't the case. It was just an alias for
std::to_string()for non-doubletypes. So there was no need for it.