Salome HOME
fix compilation issue with gcc 6.3
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 7 Mar 2018 11:02:54 +0000 (12:02 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 7 Mar 2018 11:02:54 +0000 (12:02 +0100)
src/HYDROData/HYDROData_PolylineXY.cxx

index 33e4090ad12b241dabb98d18f7ad2505ed4ffcc2..1741bb6ea1df83ccd1bb8f520a405457d3ae81ea 100644 (file)
@@ -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);