Use std::locale::classic static local
Prevents performance issues when creating new locales under MSVC
This commit is contained in:
parent
103dde67f6
commit
ae2a9ef538
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue