mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 14:25:37 +05:00
Localization
This commit is contained in:
parent
53cbd8bdff
commit
50d3f067f7
@ -49,6 +49,8 @@
|
|||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
const double PRECISION = 1e-7;
|
const double PRECISION = 1e-7;
|
||||||
@ -321,9 +323,7 @@ bool process( const TCollection_AsciiString& str, int convMode,
|
|||||||
bool& non_neg, bool& non_zero,
|
bool& non_neg, bool& non_zero,
|
||||||
bool& singulars, double& sing_point )
|
bool& singulars, double& sing_point )
|
||||||
{
|
{
|
||||||
// Set "C" numeric locale to save numbers correctly
|
Kernel_Utils::Localizer loc;
|
||||||
std::string aCurLocale = setlocale(LC_NUMERIC, 0);
|
|
||||||
setlocale(LC_NUMERIC, "C");
|
|
||||||
|
|
||||||
bool parsed_ok = true;
|
bool parsed_ok = true;
|
||||||
Handle( ExprIntrp_GenExp ) myExpr;
|
Handle( ExprIntrp_GenExp ) myExpr;
|
||||||
@ -377,9 +377,6 @@ bool process( const TCollection_AsciiString& str, int convMode,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return previous locale
|
|
||||||
setlocale(LC_NUMERIC, aCurLocale.data());
|
|
||||||
|
|
||||||
return res && non_neg && non_zero && ( !singulars );
|
return res && non_neg && non_zero && ( !singulars );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user