From 4f954fcb6149348c5ec8ff5800fde8a5077dc1a7 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 23 Oct 2018 16:41:45 +0300 Subject: [PATCH] Remove compilation errors and warnings --- src/Model/Model_ResultConstruction.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Model_ResultConstruction.cpp b/src/Model/Model_ResultConstruction.cpp index 9676918db..6ad810f2e 100644 --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@ -102,7 +102,7 @@ bool Model_ResultConstruction::updateShape() { std::shared_ptr aData = std::dynamic_pointer_cast(data()); if (aData && aData->isValid()) { - TDF_Label& aShapeLab = aData->shapeLab(); + TDF_Label aShapeLab = aData->shapeLab(); Handle(TNaming_NamedShape) aNS; if (aShapeLab.FindAttribute(TNaming_NamedShape::GetID(), aNS)) { TopoDS_Shape aShape = aNS->Get(); @@ -166,7 +166,7 @@ int Model_ResultConstruction::facesNum(const bool theUpdateNaming) int aResult = 0; std::shared_ptr aData = std::dynamic_pointer_cast(data()); if (aData.get() && aData->isValid()) { - TDF_Label& aShapeLab = aData->shapeLab(); + TDF_Label aShapeLab = aData->shapeLab(); TDF_ChildIDIterator anOldIter(aShapeLab, TDataStd_IntPackedMap::GetID()); for (; anOldIter.More(); anOldIter.Next()) { aResult++; @@ -181,7 +181,7 @@ std::shared_ptr Model_ResultConstruction::face(const int theIndex) int anIndex = 0; std::shared_ptr aData = std::dynamic_pointer_cast(data()); if (aData.get() && aData->isValid()) { - TDF_Label& aShapeLab = aData->shapeLab(); + TDF_Label aShapeLab = aData->shapeLab(); TDF_ChildIDIterator anOldIter(aShapeLab, TDataStd_IntPackedMap::GetID()); for (; anOldIter.More(); anOldIter.Next()) { if (anIndex == theIndex) { @@ -207,7 +207,7 @@ void Model_ResultConstruction::storeShape(std::shared_ptr theShap std::shared_ptr aData = std::dynamic_pointer_cast(data()); if (aData && aData->isValid()) { std::string aMyName = data()->name(); - TDF_Label& aShapeLab = aData->shapeLab(); + TDF_Label aShapeLab = aData->shapeLab(); if (!theShape.get() || theShape->isNull()) { aShapeLab.ForgetAllAttributes(); TDataStd_Name::Set(aShapeLab, aMyName.c_str()); // restore name forgotten -- 2.39.2