From: jfa Date: Mon, 15 Aug 2022 13:13:28 +0000 (+0300) Subject: Fix compilation errors on Linux X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b67d80609983d75e6a7f8561846fa4f60a77b3e;p=modules%2Fgeom.git Fix compilation errors on Linux --- diff --git a/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx b/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx index 87fd774f0..cd8d9d84b 100644 --- a/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx @@ -249,19 +249,26 @@ NCollection_List> GEOMImpl_ConformityDrive Standard_Real theTolerance) const { NCollection_List> aDistShapes; + NCollection_List> aDistShapesTmp; switch (theShapeType) { case TopAbs_VERTEX: - aDistShapes.Append(distantShapes(theShape, TopAbs_EDGE, theShapeType, theTolerance)); - aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance)); + aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, theShapeType, theTolerance); + aDistShapes.Append(aDistShapesTmp); + aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance); + aDistShapes.Append(aDistShapesTmp); break; case TopAbs_EDGE: - aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance)); - aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance)); + aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance); + aDistShapes.Append(aDistShapesTmp); + aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance); + aDistShapes.Append(aDistShapesTmp); break; case TopAbs_FACE: - aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance)); - aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_EDGE, theTolerance)); + aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance); + aDistShapes.Append(aDistShapesTmp); + aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_EDGE, theTolerance); + aDistShapes.Append(aDistShapesTmp); break; } @@ -272,15 +279,19 @@ NCollection_List> GEOMImpl_ConformityDrive //function : distantShapes //purpose : TODO: Not implemented! Wait for required functionality! //======================================================================= -NCollection_List> GEOMImpl_ConformityDriver::distantShapes( - const TopoDS_Shape& theShape, - Standard_Real theTolerance) const +NCollection_List> GEOMImpl_ConformityDriver::distantShapes + (const TopoDS_Shape& theShape, + Standard_Real theTolerance) const { NCollection_List> aDistShapes; - - aDistShapes.Append(distantShapes(theShape, TopAbs_EDGE, TopAbs_VERTEX, theTolerance)); - aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, TopAbs_VERTEX, theTolerance)); - aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, TopAbs_EDGE, theTolerance)); + NCollection_List> aDistShapesTmp; + + aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, TopAbs_VERTEX, theTolerance); + aDistShapes.Append(aDistShapesTmp); + aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_VERTEX, theTolerance); + aDistShapes.Append(aDistShapesTmp); + aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_EDGE, theTolerance); + aDistShapes.Append(aDistShapesTmp); return aDistShapes; } diff --git a/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx b/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx index 3c015649e..89aafaf93 100644 --- a/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx @@ -61,8 +61,8 @@ private: Standard_EXPORT Standard_Real updateTolerance(const TopoDS_Shape& theShape) const; - Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, - std::vector& params) + Standard_EXPORT virtual bool GetCreationInformation(std::string& /*theOperationName*/, + std::vector& /*params*/) { return Standard_False; } diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index cc4691686..08d552ee5 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -2800,13 +2800,13 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::SurfaceCurvatureByPointAndDirec * \param theChecks list of failed checks, contains type of check and failed shapes */ //============================================================================= -std::list GEOMImpl_IMeasureOperations::SelfIntersected2D( - const std::list& theChecks) +std::list + GEOMImpl_IMeasureOperations::SelfIntersected2D(const std::list& theChecks) { SetErrorCode(KO); MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D"); - std::list aSelfInters2D; + std::list aSelfInters2D; Handle(GEOM_Object) aConformity = GetEngine()->AddObject(GEOM_CHECKCONFORMITY); Handle(GEOM_Function) aFunction = aConformity->AddFunction(GEOMImpl_ConformityDriver::GetID(), CONFORMITY_SELFINTERSECTED); if (aFunction.IsNull()) return aSelfInters2D; @@ -2837,7 +2837,7 @@ std::list GEOMImpl_IMeasureOperations namespace { - static bool checkTypes(const GEOMImpl_IMeasureOperations::FailedShapes& theShapes, + static bool checkTypes(const GEOMImpl_IMeasureOperations::CoupleOfObjects& theShapes, const int theShapeType1, const int theShapeType2) { @@ -2869,15 +2869,16 @@ namespace * \param theShapeType2 Type of shape. */ //============================================================================= -std::list GEOMImpl_IMeasureOperations::InterferingSubshapes( - const std::list& theChecks, - const int theShapeType1, - const int theShapeType2) +std::list + GEOMImpl_IMeasureOperations::InterferingSubshapes + (const std::list& theChecks, + const int theShapeType1, + const int theShapeType2) { SetErrorCode(KO); MESSAGE("GEOMImpl_IMeasureOperations::interferingSubshapes"); - std::list < GEOMImpl_IMeasureOperations::FailedShapes> anInterfer; + std::list anInterfer; try { OCC_CATCH_SIGNALS; @@ -2943,16 +2944,17 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IMeasureOperations::SmallEdges( * \param theTolerance tolerance. */ //============================================================================= -std::list GEOMImpl_IMeasureOperations::DistantShapes( - const std::list& theChecks, - const int theShapeType, - const int theSubShapeType, - double theTolerance) +std::list + GEOMImpl_IMeasureOperations::DistantShapes + (const std::list& theChecks, + const int theShapeType, + const int theSubShapeType, + double theTolerance) { SetErrorCode(KO); MESSAGE("GEOMImpl_IMeasureOperations::distantShapes"); - std::list aDistShapes; + std::list aDistShapes; try { OCC_CATCH_SIGNALS; diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx index 7e8a0e087..a14a01893 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx @@ -218,22 +218,22 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Handle(GEOM_Object) thePoint); // Methods checking the shapes which are not applicable to modelling operations - typedef std::pair< Handle(GEOM_Object), Handle(GEOM_Object)> FailedShapes; + typedef std::pair< Handle(GEOM_Object), Handle(GEOM_Object)> CoupleOfObjects; struct FailedChecks { Standard_Integer TypeOfCheck; - FailedShapes FailedShapes; + CoupleOfObjects FailedShapes; }; - Standard_EXPORT std::list SelfIntersected2D(const std::list& theChecks); - Standard_EXPORT std::list InterferingSubshapes(const std::list& theChecks, - const int theShapeType1, - const int theShapeType2); + Standard_EXPORT std::list SelfIntersected2D(const std::list& theChecks); + Standard_EXPORT std::list InterferingSubshapes(const std::list& theChecks, + const int theShapeType1, + const int theShapeType2); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SmallEdges(const std::list& theChecks); - Standard_EXPORT std::list DistantShapes(const std::list& theChecks, - const int theShapeType, - const int theSubShapeType, - double theTolerance); + Standard_EXPORT std::list DistantShapes(const std::list& theChecks, + const int theShapeType, + const int theSubShapeType, + double theTolerance); Standard_EXPORT void CheckConformityShape(Handle(GEOM_Object) theShape, std::list& theChecks); Standard_EXPORT double ComputeTolerance(Handle(GEOM_Object) theEdge, Handle(GEOM_Object) theFace);