From 947bcd90c6286d18d7d94625e6687a53e8c08bd7 Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 2 Nov 2009 12:26:24 +0000 Subject: [PATCH] Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales --- src/GHS3DPlugin_GHS3D.cxx | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) 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; -- 2.39.2