From ae2a9ef53804eb0da4e684fb26cbb5317d43f6d0 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 26 Feb 2021 11:35:20 -0800 Subject: [PATCH] Use std::locale::classic static local Prevents performance issues when creating new locales under MSVC --- pcbnew/plugins/fabmaster/import_fabmaster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/plugins/fabmaster/import_fabmaster.cpp b/pcbnew/plugins/fabmaster/import_fabmaster.cpp index f92e91ed86..c01f4f41b8 100644 --- a/pcbnew/plugins/fabmaster/import_fabmaster.cpp +++ b/pcbnew/plugins/fabmaster/import_fabmaster.cpp @@ -57,7 +57,7 @@ double FABMASTER::readDouble( const std::string aStr ) const { std::istringstream istr( aStr ); - istr.imbue( std::locale( "C" ) ); + istr.imbue( std::locale::classic() ); double doubleValue; istr >> doubleValue; @@ -68,7 +68,7 @@ double FABMASTER::readDouble( const std::string aStr ) const int FABMASTER::readInt( const std::string aStr ) const { std::istringstream istr( aStr ); - istr.imbue( std::locale( "C" ) ); + istr.imbue( std::locale::classic() ); int intValue; istr >> intValue;