From 5251e4f54c4d48716662b9215937486c8443da25 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 21 Oct 2009 15:04:05 +0000 Subject: [PATCH] Issue 0020461: EDF 1102 GHS3DPLUGIN: Bad detection of volumes with Ghs3d mesh Additional fix for locale --- src/GHS3DPlugin_GHS3D.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; -- 2.39.2