From: mpv Date: Tue, 23 Oct 2018 13:41:45 +0000 (+0300) Subject: Remove compilation errors and warnings X-Git-Tag: End2018~277 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9d4f213fafa55cd99d909a06ebe7b4fdce18c7a6;p=modules%2Fshaper.git Remove compilation errors and warnings --- 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