1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0029160: Coding - AppleCLang 9 compiler warning "binding dereferenced null pointer to reference has undefined behavior"

Avoid returning reference to null in AppDef_MyLineTool
This commit is contained in:
abv 2017-09-29 11:18:11 +03:00 committed by bugmaster
parent 00af0ebb9d
commit 8157aa285b
2 changed files with 3 additions and 24 deletions

View 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 , const Standard_Integer ,
const Standard_Integer ) const Standard_Integer )
{ {
return *((AppDef_MultiLine*) 0); return theML; // stub
} }
Standard_Boolean AppDef_MyLineTool::MakeMLOneMorePoint(const AppDef_MultiLine& , Standard_Boolean AppDef_MyLineTool::MakeMLOneMorePoint(const AppDef_MultiLine& ,

View File

@ -94,7 +94,7 @@ public:
//! Is never called in the algorithms. //! Is never called in the algorithms.
//! Nothing is done. //! 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 I1,
const Standard_Integer I2, const Standard_Integer I2,
const Standard_Integer NbPMin); const Standard_Integer NbPMin);
@ -106,27 +106,6 @@ public:
const Standard_Integer I2, const Standard_Integer I2,
const Standard_Integer indbad, const Standard_Integer indbad,
AppDef_MultiLine& OtherLine); AppDef_MultiLine& OtherLine);
protected:
private:
}; };
#endif // _AppDef_MyLineTool_HeaderFile #endif // _AppDef_MyLineTool_HeaderFile