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

src/GHS3DPlugin_GHS3D.cxx

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