]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Issue 0020461: EDF 1102 GHS3DPLUGIN: Bad detection of volumes with Ghs3d mesh RELIQUAT_5x_30102009
authorvsr <vsr@opencascade.com>
Wed, 21 Oct 2009 15:04:05 +0000 (15:04 +0000)
committervsr <vsr@opencascade.com>
Wed, 21 Oct 2009 15:04:05 +0000 (15:04 +0000)
Additional fix for locale

src/GHS3DPlugin_GHS3D.cxx

index 481b72e4142d7c28b88851a8af2a8261e6e75794..f9eea066d115d731ad200320f5a4aec57f25bcec 100644 (file)
@@ -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 <const SMDS_MeshNode*>& theNodeByGhs3dId,
                            int                            nbEnforcedVertices) {
 
+  Localizer loc;
   struct stat  status;
   size_t       length;