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

Save numbers to vars as is #1030

Merged
merged 5 commits into from
Feb 24, 2024

Conversation

Destroy666x
Copy link
Contributor

The PR:

  • makes it so that e.g. incrementing an int in a variable keeps it as int, since previous to_string used sprintf under the hood and added a random number of zeros after ., depending on compiler. This should be much more consistent. Even better would be std::format from what I read, but it's only C++20 and that was impossible for now.
  • checks for all limits in the GetDouble/GetInt functions to avoid some false conversions. Only upper limit of double was checked for some reason earlier. This is still far from perfect as you can't go up to max, but shouldn't matter too much. Also, bigger numbers support would be nice with different types, but I'll create another issue for that.

@Destroy666x Destroy666x force-pushed the SaveNumbersToVarsAsIs branch from 6235067 to 94a9c62 Compare February 22, 2024 19:17
@Destroy666x Destroy666x force-pushed the SaveNumbersToVarsAsIs branch 4 times, most recently from 02dea85 to 1be43f1 Compare February 23, 2024 01:40
* Minor style changes
* Move function definitions
* Split utility.hpp
* Enable include of export-symbol-helper.hpp in tests
@WarmUpTill WarmUpTill force-pushed the SaveNumbersToVarsAsIs branch 3 times, most recently from 191ca60 to b3c5935 Compare February 24, 2024 13:15
@WarmUpTill WarmUpTill force-pushed the SaveNumbersToVarsAsIs branch 2 times, most recently from 6052bd2 to 1669341 Compare February 24, 2024 14:47
@WarmUpTill WarmUpTill force-pushed the SaveNumbersToVarsAsIs branch from 1669341 to 286e463 Compare February 24, 2024 15:25
@WarmUpTill WarmUpTill merged commit ecfd177 into WarmUpTill:master Feb 24, 2024
7 checks passed
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