0024843: CLang warnings -Wconstant-logical-operand
[occt.git] / src / TopOpeBRepTool / TopOpeBRepTool_makeTransition.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 53c36e0..76aca09
@@ -1,8 +1,18 @@
-// File:       TopOpeBRepTool_makeTransition.cxx
-// Created:    Thu Feb 11 12:30:17 1999
-// Author:      Xuan PHAM PHU
-//             <xpu@poulopox.paris1.matra-dtv.fr>
-
+// Created on: 1999-02-11
+// Created by: Xuan PHAM PHU
+// Copyright (c) 1999-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <TopOpeBRepTool_TOOL.hxx>
 #include <TopOpeBRepTool_EXPORT.hxx>
@@ -166,7 +176,7 @@ static Standard_Integer FUN_mkT2dquad(const Standard_Real curvC1, const Standard
   if (samec)           return isON2ifss;//is ON if curves are on same side/tg line
   if (curvC1 > curvC2) return isIN2ifss;//is IN if curves are on same side/tg line
   else                 return isOU2ifss;//is OU if curves are on same side/tg line
-  return 0;
+//  return 0;
 }
 
 static Standard_Boolean FUN_getnearpar(const TopoDS_Edge& e,const Standard_Real par,const Standard_Real f,const Standard_Real l,
@@ -239,7 +249,6 @@ static Standard_Boolean FUN_getsta(const Standard_Integer mkt,const gp_Dir& tga1
     sta = TopAbs_ON; 
     return Standard_True;
   } 
-  return Standard_False;
 } 
 static Standard_Boolean FUN_mkT2dquad(const TopoDS_Edge& e1,const Standard_Real par1,const Standard_Real f1,const Standard_Real l1,
                         const TopoDS_Edge& e2,const Standard_Real par2,
@@ -253,14 +262,14 @@ static Standard_Boolean FUN_mkT2dquad(const TopoDS_Edge& e1,const Standard_Real
   // = sta = state of point on e1 after pt / e2
 
   gp_Dir tga1,tga2;
-  Standard_Boolean mk1 = isINifh1 || isON2ifss || isIN2ifss;
+  Standard_Boolean mk1 = (mkt==isINifh1) || (mkt==isON2ifss) || (mkt==isIN2ifss);
   if (mk1) {
     Standard_Integer st1 = 0; gp_Dir tgnear1;
     Standard_Boolean ok = FUN_tg(e1,par1,f1,l1,factor,tgnear1,st1);
     if (!ok) return Standard_False;
     tga1 = (st1 == AFTER) ? tgnear1 : tgnear1.Reversed();    
   }
-  Standard_Boolean mk2 = isINifh2 || isON2ifss || isOU2ifss;
+  Standard_Boolean mk2 = (mkt==isINifh2) || (mkt==isON2ifss) || (mkt==isOU2ifss);
   if (mk2) {
     Standard_Real f2,l2; FUN_tool_bounds(e2,f2,l2);
     Standard_Integer st2 = 0; gp_Dir tgnear2;