]> OCCT Git - occt.git/commitdiff
0029160: Coding - AppleCLang 9 compiler warning "binding dereferenced null pointer...
authorabv <abv@opencascade.com>
Fri, 29 Sep 2017 08:18:11 +0000 (11:18 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 6 Oct 2017 07:28:12 +0000 (10:28 +0300)
Avoid returning reference to null in AppDef_MyLineTool

src/AppDef/AppDef_MyLineTool.cxx
src/AppDef/AppDef_MyLineTool.hxx

index 93827b115e6a22225d1e1671f8273f070fb6042d..3bc30bc204c2aa8231332b19355024a810cb7e11 100644 (file)
@@ -138,12 +138,12 @@ Standard_Boolean AppDef_MyLineTool::Tangency(const AppDef_MultiLine& ML,
 }
 
 
-AppDef_MultiLine& AppDef_MyLineTool::MakeMLBetween(const AppDef_MultiLine&,
+AppDef_MultiLine AppDef_MyLineTool::MakeMLBetween(const AppDef_MultiLine& theML,
                                                   const Standard_Integer ,
                                                   const Standard_Integer ,
                                                   const Standard_Integer )
 {
-  return *((AppDef_MultiLine*) 0);
+  return theML; // stub
 }
 
 Standard_Boolean AppDef_MyLineTool::MakeMLOneMorePoint(const AppDef_MultiLine& ,
index 7f6917751f8db82778756f31851daf083665c673..b40b26de7a8d46d33da7dad309e74b72d0c3536e 100644 (file)
@@ -94,7 +94,7 @@ public:
   
   //! Is never called in the algorithms.
   //! Nothing is done.
-  Standard_EXPORT static AppDef_MultiLine& MakeMLBetween (const AppDef_MultiLine& ML,
+  Standard_EXPORT static AppDef_MultiLine MakeMLBetween (const AppDef_MultiLine& ML,
                                                           const Standard_Integer I1,
                                                           const Standard_Integer I2,
                                                           const Standard_Integer NbPMin);
@@ -106,27 +106,6 @@ public:
                                                                 const Standard_Integer I2,
                                                                 const Standard_Integer indbad,
                                                                 AppDef_MultiLine& OtherLine);
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-
 };
 
-
-
-
-
-
-
 #endif // _AppDef_MyLineTool_HeaderFile