Unverified Commit 29ea72ed authored by Bret Curtis's avatar Bret Curtis Committed by GitHub

Merge pull request #1920 from Capostrophic/notation

Actually fix General (%g) number formatting (bug #4463)
parents 6035636e 36351604
Pipeline #30286632 passed with stage
......@@ -65,23 +65,18 @@ namespace Interpreter
}
else if (notation == ShortestNotation)
{
std::string scientific;
std::string fixed;
out << std::scientific << value;
scientific = out.str();
out << value;
std::string standard = out.str();
out.str(std::string());
out.clear();
out << std::fixed << value;
fixed = out.str();
out << std::scientific << value;
std::string scientific = out.str();
mFormattedMessage += fixed.length() < scientific.length() ? fixed : scientific;
mFormattedMessage += standard.length() < scientific.length() ? standard : scientific;
}
else
else
{
out << std::scientific << value;
mFormattedMessage += out.str();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment