Salome HOME
Remove compilation errors and warnings
authormpv <mpv@opencascade.com>
Tue, 23 Oct 2018 13:24:56 +0000 (16:24 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
src/Model/Model_AttributeSelection.cpp
src/Model/Model_BodyBuilder.cpp

index cb17f802ec260e57cf0cdb53347b6274efcae789..d30830cc045b377f17141ebb6d0d89f0bfd897f8 100644 (file)
@@ -706,7 +706,7 @@ void Model_AttributeSelection::selectBody(
     TopoDS_Shape aNewSub = theSubShape->impl<TopoDS_Shape>();
     FeaturePtr aFeatureOwner = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
     if (aFeatureOwner->document() != theContext->document()) { // reference to the sketch face
-      if (theSubShape->shapeType() == TopAbs_FACE) { // sketch face
+      if (theSubShape->shapeType() == GeomAPI_Shape::FACE) { // sketch face
         ResultConstructionPtr aConstr =
           std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theContext);
         int aFaceIndex = -1, aFacesNum = aConstr->facesNum();
@@ -720,9 +720,9 @@ void Model_AttributeSelection::selectBody(
           TDataStd_Integer::Set(aSelLab, kEXT_SKETCH_FACE, aFaceIndex); // store index of the face
           return;
         }
-      } else if (theSubShape->shapeType() == TopAbs_EDGE ||  // sketch result edge (full one)
-                 theSubShape->shapeType() == TopAbs_VERTEX) { // or start/end vertex
-        bool isVertex = theSubShape->shapeType() == TopAbs_VERTEX;
+      } else if (theSubShape->shapeType() == GeomAPI_Shape::EDGE ||// sketch result edge (full one)
+                 theSubShape->shapeType() == GeomAPI_Shape::VERTEX) { // or start/end vertex
+        bool isVertex = theSubShape->shapeType() == GeomAPI_Shape::VERTEX;
         CompositeFeaturePtr aComposite = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(
           theContext->document()->feature(theContext));
         if (aComposite.get()) { // iterate edges of composite to find index of matched with value
index ae6f60d88c93282077cf244a42cf82681c75ef08..d4e81b0eb42961a146f7925b76e780dbec70a704 100755 (executable)
@@ -134,7 +134,7 @@ void Model_BodyBuilder::store(const GeomShapePtr& theShape,
 {
   std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
-    TDF_Label& aShapeLab = aData->shapeLab();
+    TDF_Label aShapeLab = aData->shapeLab();
     // clean builders
     clean();
     // store the new shape as primitive
@@ -178,7 +178,7 @@ void Model_BodyBuilder::storeGenerated(const GeomShapePtr& theFromShape,
 {
   std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
-    TDF_Label& aShapeLab = aData->shapeLab();
+    TDF_Label aShapeLab = aData->shapeLab();
     // clean builders
     clean();
     // store the new shape as primitive
@@ -969,7 +969,7 @@ bool Model_BodyBuilder::isLatestEqual(const GeomShapePtr& theShape)
     TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
     std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
     if (aData) {
-      TDF_Label& aShapeLab = aData->shapeLab();
+      TDF_Label aShapeLab = aData->shapeLab();
       Handle(TNaming_NamedShape) aName;
       if (aShapeLab.FindAttribute(TNaming_NamedShape::GetID(), aName)) {
         TopoDS_Shape aLatest = TNaming_Tool::CurrentShape(aName);