fixed performance degradation (#272)
This commit is contained in:
parent
87dea32e81
commit
29c5f32d42
3 changed files with 7 additions and 2 deletions
|
|
@ -2232,7 +2232,8 @@ class basic_json
|
|||
{
|
||||
std::stringstream ss;
|
||||
// fix locale problems
|
||||
ss.imbue(std::locale(std::locale(), new DecimalSeparator));
|
||||
const static std::locale loc(std::locale(), new DecimalSeparator);
|
||||
ss.imbue(loc);
|
||||
|
||||
// 6, 15 or 16 digits of precision allows round-trip IEEE 754
|
||||
// string->float->string, string->double->string or string->long
|
||||
|
|
|
|||
|
|
@ -2232,7 +2232,8 @@ class basic_json
|
|||
{
|
||||
std::stringstream ss;
|
||||
// fix locale problems
|
||||
ss.imbue(std::locale(std::locale(), new DecimalSeparator));
|
||||
const static std::locale loc(std::locale(), new DecimalSeparator);
|
||||
ss.imbue(loc);
|
||||
|
||||
// 6, 15 or 16 digits of precision allows round-trip IEEE 754
|
||||
// string->float->string, string->double->string or string->long
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue