From: ouv Date: Mon, 2 Nov 2009 12:26:24 +0000 (+0000) Subject: Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales X-Git-Tag: V5_1_3~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=947bcd90c6286d18d7d94625e6687a53e8c08bd7;p=plugins%2Fghs3dplugin.git Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales --- diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index f9eea06..dc7045d 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -28,6 +28,8 @@ #include "GHS3DPlugin_Hypothesis.hxx" +#include + #include "SMESH_Gen.hxx" #include "SMESH_Mesh.hxx" #include "SMESH_Comment.hxx" @@ -106,22 +108,6 @@ 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; -}; - //============================================================================= /*! * @@ -761,7 +747,7 @@ static bool readResultFile(const int fileOpen, int nbEnforcedVertices) { MESSAGE("GHS3DPlugin_GHS3D::readResultFile()"); - Localizer loc; + Kernel_Utils::Localizer loc; struct stat status; size_t length; @@ -1008,7 +994,7 @@ static bool readResultFile(const int fileOpen, vector & theNodeByGhs3dId, int nbEnforcedVertices) { - Localizer loc; + Kernel_Utils::Localizer loc; struct stat status; size_t length;