]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix compilation errors on Linux
authorjfa <jfa@opencascade.com>
Mon, 15 Aug 2022 13:13:28 +0000 (16:13 +0300)
committerjfa <jfa@opencascade.com>
Mon, 15 Aug 2022 13:13:28 +0000 (16:13 +0300)
src/GEOMImpl/GEOMImpl_ConformityDriver.cxx
src/GEOMImpl/GEOMImpl_ConformityDriver.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx

index 87fd774f0b95b0f7d7d9fd6df58a40ba9e99069f..cd8d9d84b91e477836c996c17f860a01a13be717 100644 (file)
@@ -249,19 +249,26 @@ NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDrive
   Standard_Real          theTolerance) const
 {
   NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes;
+  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDrive
 //function : distantShapes
 //purpose  : TODO: Not implemented! Wait for required functionality!
 //=======================================================================
-NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes(
-  const TopoDS_Shape& theShape,
-  Standard_Real       theTolerance) const
+NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes
+  (const TopoDS_Shape& theShape,
+   Standard_Real       theTolerance) const
 {
   NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>> 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;
 }
index 3c015649e28fcfe1d93f21e133ee3b45a9998e89..89aafaf93047dfeb32ea782f01353215860d7245 100644 (file)
@@ -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<GEOM_Param>& params)
+  Standard_EXPORT  virtual bool GetCreationInformation(std::string& /*theOperationName*/,
+                                                       std::vector<GEOM_Param>& /*params*/)
   {
     return Standard_False;
   }
index cc46916863bbfafd920475170bb6c1ad199107b6..08d552ee5fb5d62c1aab19a80278372f176d76c1 100644 (file)
@@ -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::FailedShapes> GEOMImpl_IMeasureOperations::SelfIntersected2D(
-    const std::list<FailedChecks>& theChecks)
+std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
+  GEOMImpl_IMeasureOperations::SelfIntersected2D(const std::list<FailedChecks>& theChecks)
 {
   SetErrorCode(KO);
   MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D");
 
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes> aSelfInters2D;
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> 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::FailedShapes> 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::FailedShapes> GEOMImpl_IMeasureOperations::InterferingSubshapes(
-    const std::list<FailedChecks>& theChecks,
-    const int                      theShapeType1,
-    const int                      theShapeType2)
+std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
+  GEOMImpl_IMeasureOperations::InterferingSubshapes
+    (const std::list<FailedChecks>& theChecks,
+     const int                      theShapeType1,
+     const int                      theShapeType2)
 {
   SetErrorCode(KO);
   MESSAGE("GEOMImpl_IMeasureOperations::interferingSubshapes");
 
-  std::list < GEOMImpl_IMeasureOperations::FailedShapes> anInterfer;
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> anInterfer;
   try
   {
     OCC_CATCH_SIGNALS;
@@ -2943,16 +2944,17 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IMeasureOperations::SmallEdges(
  *  \param theTolerance tolerance.
  */
  //=============================================================================
-std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::DistantShapes(
-    const std::list<FailedChecks>& theChecks,
-    const int                      theShapeType,
-    const int                      theSubShapeType,
-    double                         theTolerance)
+std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
+  GEOMImpl_IMeasureOperations::DistantShapes
+    (const std::list<FailedChecks>& theChecks,
+     const int                      theShapeType,
+     const int                      theSubShapeType,
+     double                         theTolerance)
 {
   SetErrorCode(KO);
   MESSAGE("GEOMImpl_IMeasureOperations::distantShapes");
 
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes> aDistShapes;
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aDistShapes;
   try
   {
     OCC_CATCH_SIGNALS;
index 7e8a0e087592056a71bdbf1dc673a00b8b077e4f..a14a01893a42f18cc9c2eecb2d3685f2332d1128 100644 (file)
@@ -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<FailedShapes> SelfIntersected2D(const std::list<FailedChecks>& theChecks);
-  Standard_EXPORT std::list<FailedShapes> InterferingSubshapes(const std::list<FailedChecks>& theChecks,
-                                                               const int theShapeType1,
-                                                               const int theShapeType2);
+  Standard_EXPORT std::list<CoupleOfObjects> SelfIntersected2D(const std::list<FailedChecks>& theChecks);
+  Standard_EXPORT std::list<CoupleOfObjects> InterferingSubshapes(const std::list<FailedChecks>& theChecks,
+                                                                  const int theShapeType1,
+                                                                  const int theShapeType2);
   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SmallEdges(const std::list<FailedChecks>& theChecks);
-  Standard_EXPORT std::list<FailedShapes> DistantShapes(const std::list<FailedChecks>& theChecks,
-                                                        const int theShapeType,
-                                                        const int theSubShapeType,
-                                                        double theTolerance);
+  Standard_EXPORT std::list<CoupleOfObjects> DistantShapes(const std::list<FailedChecks>& theChecks,
+                                                           const int theShapeType,
+                                                           const int theSubShapeType,
+                                                           double theTolerance);
   Standard_EXPORT void CheckConformityShape(Handle(GEOM_Object) theShape, std::list<FailedChecks>& theChecks);
 
   Standard_EXPORT double ComputeTolerance(Handle(GEOM_Object) theEdge, Handle(GEOM_Object) theFace);