From 1c9a5ece83c9c23b7ae933b40f4c8135332fe40d Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Sat, 27 Mar 2021 23:36:51 +0100 Subject: [PATCH] setLocale in C (not std C++) --- SessionCreator.cpp | 2 +- SessionVisitor.cpp | 4 ++-- Settings.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SessionCreator.cpp b/SessionCreator.cpp index 1ea1a14..d6ca723 100644 --- a/SessionCreator.cpp +++ b/SessionCreator.cpp @@ -121,7 +121,7 @@ SessionLoader::SessionLoader(Session *session, int recursion): Visitor(), session_(session), xmlCurrent_(nullptr), recursion_(recursion) { // impose C locale - std::setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); } diff --git a/SessionVisitor.cpp b/SessionVisitor.cpp index a9ef63a..56d66b1 100644 --- a/SessionVisitor.cpp +++ b/SessionVisitor.cpp @@ -27,7 +27,7 @@ using namespace tinyxml2; bool SessionVisitor::saveSession(const std::string& filename, Session *session) { // impose C locale - std::setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); // creation of XML doc XMLDocument xmlDoc; @@ -82,7 +82,7 @@ SessionVisitor::SessionVisitor(tinyxml2::XMLDocument *doc, bool recursive) : Visitor(), recursive_(recursive), xmlCurrent_(root) { // impose C locale - std::setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); if (doc == nullptr) xmlDoc_ = new XMLDocument; diff --git a/Settings.cpp b/Settings.cpp index cd57d41..477e320 100644 --- a/Settings.cpp +++ b/Settings.cpp @@ -19,7 +19,7 @@ static string settingsFilename = ""; void Settings::Save() { // impose C locale for all app - std::setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); XMLDocument xmlDoc; XMLDeclaration *pDec = xmlDoc.NewDeclaration(); @@ -221,7 +221,7 @@ void Settings::Save() void Settings::Load() { // impose C locale for all app - std::setlocale(LC_ALL, "C"); + setlocale(LC_ALL, "C"); XMLDocument xmlDoc; if (settingsFilename.empty())