mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 18:39:39 +00:00
Actually fix General number formatting
This commit is contained in:
parent
6035636e29
commit
363516049d
1 changed files with 6 additions and 11 deletions
|
@ -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;
|
||||
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
|
||||
else
|
||||
{
|
||||
out << std::scientific << value;
|
||||
mFormattedMessage += out.str();
|
||||
|
|
Loading…
Reference in a new issue