From: vsr Date: Wed, 21 Oct 2009 15:09:56 +0000 (+0000) Subject: Issue 0020461: EDF 1102 GHS3DPLUGIN: Bad detection of volumes with Ghs3d mesh X-Git-Tag: V4_1_0_maintainance_FINAL X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da022b09b6980607802e90abadc89aa5323599d8;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 aa92530..28f1022 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -105,6 +105,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; +}; + //============================================================================= /*! * @@ -663,6 +679,7 @@ static bool readResultFile(const int fileOpen, map & theGhs3dIdToNodeMap, bool toMeshHoles) { + Localizer loc; struct stat status; size_t length; @@ -902,6 +919,7 @@ static bool readResultFile(const int fileOpen, TopoDS_Shape aSolid, vector & theNodeByGhs3dId) { + Localizer loc; struct stat status; size_t length;