1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030835: Possible performance improvements in methods TDF_Label::FindAttribute

Make attribute iterator work with pointers to attributes, so, creation of handle on each iteration is avoided.
This commit is contained in:
mpv
2019-07-29 17:11:54 +03:00
committed by bugmaster
parent 607e5e62e7
commit c2100640f6
3 changed files with 6 additions and 3 deletions

View File

@@ -60,8 +60,8 @@ Standard_Boolean TDF_Label::FindAttribute
if (IsNull()) throw Standard_NullObject("A null Label has no attribute.");
TDF_AttributeIterator itr (myLabelNode); // Without removed attributes.
for ( ; itr.More(); itr.Next()) {
if (itr.Value()->ID() == anID) {
anAttribute = itr.Value();
if (itr.PtrValue()->ID() == anID) {
anAttribute = itr.PtrValue();
return Standard_True;
}
}