0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
[occt.git] / src / BRepLib / BRepLib_FindSurface.cxx
index 64451fb..998176d 100644 (file)
@@ -361,12 +361,9 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
     case GeomAbs_Ellipse:
     case GeomAbs_Hyperbola:
     case GeomAbs_Parabola:
-      if (c.GetType() == GeomAbs_Line)
-        // Two points on straight segment
-        iNbPoints=2;
-      else
-        // Four points on otheranalitical curves
-        iNbPoints=4;
+      // Two points on straight segment, Four points on otheranalitical curves
+      iNbPoints = (c.GetType() == GeomAbs_Line ? 2 : 4);
+      Standard_FALLTHROUGH
     default:
       { 
         // Put some points on other curves