Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #6316 (Use std::to_string() in place of MathLib::toString() ...) - deleted default implementation of Mathlib::toString() #5341

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

firewave
Copy link
Collaborator

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-double types. So there was no need for it.

@firewave
Copy link
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.

@@ -1463,23 +1463,12 @@ class TestMathLib : public TestFixture {
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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chrchr-github chrchr-github merged commit 3cf9100 into danmar:main Aug 17, 2023
72 checks passed
@firewave firewave deleted the mathlib-str-x branch August 17, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants