mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 15:40:42 +00:00
Actually fix General number formatting
This commit is contained in:
parent
6035636e29
commit
363516049d
@ -65,21 +65,16 @@ namespace Interpreter
|
|||||||
}
|
}
|
||||||
else if (notation == ShortestNotation)
|
else if (notation == ShortestNotation)
|
||||||
{
|
{
|
||||||
std::string scientific;
|
out << value;
|
||||||
std::string fixed;
|
std::string standard = out.str();
|
||||||
|
|
||||||
out << std::scientific << value;
|
|
||||||
|
|
||||||
scientific = out.str();
|
|
||||||
|
|
||||||
out.str(std::string());
|
out.str(std::string());
|
||||||
out.clear();
|
out.clear();
|
||||||
|
|
||||||
out << std::fixed << value;
|
out << std::scientific << value;
|
||||||
|
std::string scientific = out.str();
|
||||||
|
|
||||||
fixed = out.str();
|
mFormattedMessage += standard.length() < scientific.length() ? standard : scientific;
|
||||||
|
|
||||||
mFormattedMessage += fixed.length() < scientific.length() ? fixed : scientific;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user