Salome HOME
Merge branch 'BR_H2018_2' of https://codev-tuleap.cea.fr/plugins/git/salome/hydro...
[modules/hydro.git] / src / HYDROData / HYDROData_StreamAltitude.cxx
index d00d47c846d2dac6ae67b3d78766f27411b9b021..2360eddd0fce93aa735dd9b99d12bfe530995f6e 100644 (file)
@@ -61,7 +61,7 @@
 #include <BRep_Builder.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #endif
-IMPLEMENT_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject)
+
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_StreamAltitude, HYDROData_IAltitudeObject)
 
 HYDROData_StreamAltitude::HYDROData_StreamAltitude()
@@ -126,7 +126,7 @@ bool IsPointBetweenEdges2( const gp_Pnt& aFirstPnt1, const gp_Pnt& aLastPnt1,
   double z1 = x1*ya -xa*y1; // v1^va: z component
   double z2 = x2*yb -xb*y2; // v2^vb: z component
   bool isBetween = true;
-  if (((z1<0) and (z2<0)) or ((z1>=0) and (z2>=0)))
+  if (((z1<0) && (z2<0)) || ((z1>=0) && (z2>=0)))
     {
       isBetween = false;
     }
@@ -138,9 +138,9 @@ bool IsPointBetweenEdges2( const gp_Pnt& aFirstPnt1, const gp_Pnt& aLastPnt1,
       double dl1 = (aLastPnt1.X()-xg)*(aLastPnt1.X()-xg) + (aLastPnt1.Y()-yg)*(aLastPnt1.Y()-yg);
       double df2 = (aFirstPnt2.X()-xg)*(aFirstPnt2.X()-xg) + (aFirstPnt2.Y()-yg)*(aFirstPnt2.Y()-yg);
       double dl2 = (aLastPnt2.X()-xg)*(aLastPnt2.X()-xg) + (aLastPnt2.Y()-yg)*(aLastPnt2.Y()-yg);
-      double r2 = fmax(df1,dl1);
-      r2 = fmax(r2,df2);
-      r2 = fmax(r2,dl2);
+      double r2 = std::max(df1,dl1);
+      r2 = std::max(r2,df2);
+      r2 = std::max(r2,dl2);
       double d2 = (thePoint.X()-xg)*(thePoint.X()-xg) + (thePoint.Y()-yg)*(thePoint.Y()-yg);
       if (d2 > r2)
         isBetween = false;