From b2668a7b3701a4e793245e7fd592232abc3b6ef9 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 10 Jul 2017 12:15:07 +0300 Subject: [PATCH] Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute --- src/GEOM/GEOM_Function.cxx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index e21a6df18..952dbd3e9 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -822,12 +822,7 @@ void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape) TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } - + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); TCollection_AsciiString anEntry; TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry); aList->Append(anEntry); @@ -880,11 +875,7 @@ const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences() TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); _isDone = true; return aList->List(); -- 2.39.2