From: Paul RASCLE Date: Wed, 7 Mar 2018 11:02:54 +0000 (+0100) Subject: fix compilation issue with gcc 6.3 X-Git-Tag: HYDRO_V2_0_0~27^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13c7ed055a9a73b66e0dee04c7a561868b41baf8;p=modules%2Fhydro.git fix compilation issue with gcc 6.3 --- diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index 33e4090a..1741bb6e 100644 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -516,29 +516,29 @@ bool convertEdgesToSections( const TopoDS_Edge& } else // old section closed: check if we use first or last points... { - if((pmin < pmax) && ((abs(pmin - pfirst)> 1.e-3) && (abs(pmax - plast) >1.e-3))) // internal points forward + if((pmin < pmax) && ((std::abs(pmin - pfirst)> 1.e-3) && (std::abs(pmax - plast) >1.e-3))) // internal points forward forward = true; - else if ((pmin > pmax) && ((abs(pmin - plast)> 1.e-3) && (abs(pmax - pfirst) >1.e-3))) // internal points reverse + else if ((pmin > pmax) && ((std::abs(pmin - plast)> 1.e-3) && (std::abs(pmax - pfirst) >1.e-3))) // internal points reverse { pmin = p[1]; pmax = p[0]; forward = false; } - else if ((abs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst + else if ((std::abs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst pmin = pfirst; - else if ((abs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse + else if ((std::abs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse { pmin = p[1]; pmax = p[0]; forward = false; } - else if ((abs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse + else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse { pmin = p[1]; pmax = p[0]; forward = false; } - else if ((abs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast + else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast pmax = plast; } DEBTRACE("forward: "<< forward << " pmin " << pmin << " pmax " << pmax);