]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute
authorvsr <vsr@opencascade.com>
Mon, 10 Jul 2017 09:15:07 +0000 (12:15 +0300)
committervsr <vsr@opencascade.com>
Mon, 10 Jul 2017 09:15:07 +0000 (12:15 +0300)
src/GEOM/GEOM_Function.cxx

index e21a6df18e9d5800bda96e7b908f2f943bdd4109..952dbd3e95a0d7bd9e4fa89fb3d6a01581232cef 100644 (file)
@@ -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();