From 13c7ed055a9a73b66e0dee04c7a561868b41baf8 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Wed, 7 Mar 2018 12:02:54 +0100 Subject: [PATCH] fix compilation issue with gcc 6.3 --- src/HYDROData/HYDROData_PolylineXY.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.30.2