From: vsr Date: Wed, 21 Oct 2009 15:04:05 +0000 (+0000) Subject: Issue 0020461: EDF 1102 GHS3DPLUGIN: Bad detection of volumes with Ghs3d mesh X-Git-Tag: RELIQUAT_5x_30102009 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5251e4f54c4d48716662b9215937486c8443da25;p=plugins%2Fghs3dplugin.git Issue 0020461: EDF 1102 GHS3DPLUGIN: Bad detection of volumes with Ghs3d mesh Additional fix for locale --- diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index 481b72e..f9eea06 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -106,6 +106,22 @@ static void removeFile( const TCollection_AsciiString& fileName ) } } +class Localizer +{ +public: + Localizer() + { + myCurLocale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + } + ~Localizer() + { + setlocale(LC_NUMERIC, myCurLocale.c_str()); + } +private: + std::string myCurLocale; +}; + //============================================================================= /*! * @@ -745,6 +761,7 @@ static bool readResultFile(const int fileOpen, int nbEnforcedVertices) { MESSAGE("GHS3DPlugin_GHS3D::readResultFile()"); + Localizer loc; struct stat status; size_t length; @@ -991,6 +1008,7 @@ static bool readResultFile(const int fileOpen, vector & theNodeByGhs3dId, int nbEnforcedVertices) { + Localizer loc; struct stat status; size_t length;