1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0033790: Data Exchange - XCAFDoc_LayerTool creates temporary instances during initialization of layer attributes

Removed initialization of temporary objects.
This commit is contained in:
oan 2024-08-06 11:19:21 +01:00 committed by dpasukhi
parent f0620a8d65
commit bd14b69336

View File

@ -241,11 +241,9 @@ void XCAFDoc_LayerTool::SetLayer(const TDF_Label& L,
Handle(XCAFDoc_GraphNode) FGNode;
Handle(XCAFDoc_GraphNode) ChGNode;
if (! LayerL.FindAttribute( XCAFDoc::LayerRefGUID(), FGNode) ) {
FGNode = new XCAFDoc_GraphNode;
FGNode = XCAFDoc_GraphNode::Set(LayerL);
}
if (! L.FindAttribute( XCAFDoc::LayerRefGUID(), ChGNode) ) {
ChGNode = new XCAFDoc_GraphNode;
ChGNode = XCAFDoc_GraphNode::Set(L);
}
FGNode->SetGraphID( XCAFDoc::LayerRefGUID() );