From e52babccbf3c152c23c5bd5328340954b0d9de9b Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 29 Dec 2022 13:08:44 +0100 Subject: [PATCH] MSVC: fix for windows compiler Signed-off-by: Thorsten Liebig --- FDTD/excitation.cpp | 2 +- FDTD/extensions/operator_ext_upml.cpp | 2 +- nf2ff/nf2ff.cpp | 2 +- openems.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index ba0ac95..8a747f2 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -228,7 +228,7 @@ void Excitation::CalcCustomExcitation(double f0, int nTS, string signal) delete[] Signal_curr; Signal_volt = new FDTD_FLOAT[Length]; Signal_curr = new FDTD_FLOAT[Length]; - std::setlocale(LC_NUMERIC, "en_US.UTF-8"); + setlocale(LC_NUMERIC, "en_US.UTF-8"); FunctionParser fParse; fParse.AddConstant("pi", 3.14159265358979323846); fParse.AddConstant("e", 2.71828182845904523536); diff --git a/FDTD/extensions/operator_ext_upml.cpp b/FDTD/extensions/operator_ext_upml.cpp index 6683459..9dab11f 100644 --- a/FDTD/extensions/operator_ext_upml.cpp +++ b/FDTD/extensions/operator_ext_upml.cpp @@ -25,7 +25,7 @@ using namespace std; Operator_Ext_UPML::Operator_Ext_UPML(Operator* op) : Operator_Extension(op) { - std::setlocale(LC_NUMERIC, "en_US.UTF-8"); + setlocale(LC_NUMERIC, "en_US.UTF-8"); m_GradingFunction = new FunctionParser(); //default grading function SetGradingFunction(" -log(1e-6)*log(2.5)/(2*dl*Z*(pow(2.5,W/dl)-1)) * pow(2.5, D/dl) "); diff --git a/nf2ff/nf2ff.cpp b/nf2ff/nf2ff.cpp index 883b622..b249ac3 100644 --- a/nf2ff/nf2ff.cpp +++ b/nf2ff/nf2ff.cpp @@ -38,7 +38,7 @@ using namespace std; nf2ff::nf2ff(vector freq, vector theta, vector phi, vector center, unsigned int numThreads) { - std::setlocale(LC_NUMERIC, "en_US.UTF-8"); + setlocale(LC_NUMERIC, "en_US.UTF-8"); m_freq = freq; m_numTheta = theta.size(); diff --git a/openems.cpp b/openems.cpp index d9de070..8b632e2 100644 --- a/openems.cpp +++ b/openems.cpp @@ -64,7 +64,7 @@ double CalcDiffTime(timeval t1, timeval t2) openEMS::openEMS() { - std::setlocale(LC_NUMERIC, "en_US.UTF-8"); + setlocale(LC_NUMERIC, "en_US.UTF-8"); FDTD_Op=NULL; FDTD_Eng=NULL; Eng_Ext_SSD=NULL; @@ -394,7 +394,7 @@ bool openEMS::SetupProcessing() if (pb->GetProbeType()==0) { CSPrimBox* box = prim->ToBox(); - if (!(box) or box->GetDimension()!=1) + if (!(box) || box->GetDimension()!=1) { cerr << "openEMS::SetupProcessing: Error: Probe primitive type or dimension not suitable ... skipping probe " << pb->GetName() << endl; continue;