1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-31 19:20:26 +00:00

Merge pull request #1920 from Capostrophic/notation

Actually fix General (%g) number formatting (bug #4463)
This commit is contained in:
Bret Curtis 2018-09-15 21:51:43 +02:00 committed by GitHub
commit 29ea72ed6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,21 +65,16 @@ 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;
out << std::scientific << value;
std::string scientific = out.str();
fixed = out.str();
mFormattedMessage += fixed.length() < scientific.length() ? fixed : scientific;
mFormattedMessage += standard.length() < scientific.length() ? standard : scientific;
}
else
{