From 283d176cdc50b602c0236d77ff5118de06c62856 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 26 Feb 2021 17:21:55 -0800 Subject: [PATCH] Use std::locale::classic() globally This is a better alternative when imbuing streams --- 3d-viewer/3d_cache/sg/ifsg_api.cpp | 2 +- common/plugins/altium/altium_parser.cpp | 2 +- pcbnew/exporters/export_vrml.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3d-viewer/3d_cache/sg/ifsg_api.cpp b/3d-viewer/3d_cache/sg/ifsg_api.cpp index 6e57520b38..bae4fe2478 100644 --- a/3d-viewer/3d_cache/sg/ifsg_api.cpp +++ b/3d-viewer/3d_cache/sg/ifsg_api.cpp @@ -103,7 +103,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode, return false; } - op.imbue( std::locale( "C" ) ); + op.imbue( std::locale::classic() ); op << "#VRML V2.0 utf8\n"; if( renameNodes ) diff --git a/common/plugins/altium/altium_parser.cpp b/common/plugins/altium/altium_parser.cpp index cd43ef42dd..8c5a8a90b2 100644 --- a/common/plugins/altium/altium_parser.cpp +++ b/common/plugins/altium/altium_parser.cpp @@ -142,7 +142,7 @@ double ALTIUM_PARSER::PropertiesReadDouble( // Locale independent str -> double conversation std::istringstream istr( (const char*) value->second.mb_str() ); - istr.imbue( std::locale( "C" ) ); + istr.imbue( std::locale::classic() ); double doubleValue; istr >> doubleValue; diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 45ba3235d7..a6fd86746a 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -1686,7 +1686,7 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt throw( std::runtime_error( ostr.str().c_str() ) ); } - output_file.imbue( std::locale( "C" ) ); + output_file.imbue( std::locale::classic() ); // Begin with the usual VRML boilerplate wxString fn = aFullFileName;