IniFile: Use a formatting for floats that makes them survive round-trips to a decimal string and back in all cases.

See https://randomascii.wordpress.com/2012/03/08/float-precisionfrom-zero-to-100-digits-2/
This commit is contained in:
Admiral H. Curtiss 2015-07-10 22:46:48 +02:00
parent a48f2add68
commit e9b3f1154d

View File

@ -47,12 +47,12 @@ public:
void Set(const std::string& key, float newValue)
{
Set(key, StringFromFormat("%f", newValue));
Set(key, StringFromFormat("%#.9g", newValue));
}
void Set(const std::string& key, double newValue)
{
Set(key, StringFromFormat("%f", newValue));
Set(key, StringFromFormat("%#.17g", newValue));
}
void Set(const std::string& key, int newValue)