1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00

0028853: TDF_AttributeIterator should give handles instead of pointers

Make "Value" method of the iterator return Handle (instead of pointer) to unify public interfaces.
This commit is contained in:
mpv 2017-06-26 15:41:09 +03:00 committed by bugmaster
parent b721c02a6c
commit fe4f17f018
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ public:
const Standard_Boolean withoutForgotten = Standard_True) ;
inline Standard_Boolean More() const;
Standard_EXPORT void Next() ;
inline TDF_Attribute * Value() const;
inline Handle(TDF_Attribute) Value() const;
protected:
@ -92,7 +92,7 @@ private:
inline Standard_Boolean TDF_AttributeIterator::More() const
{ return (myValue != 0L); }
inline TDF_Attribute * TDF_AttributeIterator::Value() const
inline Handle(TDF_Attribute) TDF_AttributeIterator::Value() const
{ return myValue; }
#endif

View File

@ -216,7 +216,7 @@ Standard_Integer TDF_Data::CommitTransaction
TDF_AttributeIterator itr1(aLabel, Standard_False);
while (itr1.More()) {
TDF_Attribute * aPtrCurrentAtt = itr1.Value();
Handle(TDF_Attribute) aPtrCurrentAtt = itr1.Value();
itr1.Next();
// currentAtt = itr1.Value();
@ -297,7 +297,7 @@ Standard_Integer TDF_Data::CommitTransaction
}
// --------------------------------------------------------- Modified.
else {
const TDF_Attribute* anAttrPtr = aPtrCurrentAtt; // to avoid ambiguity
const TDF_Attribute* anAttrPtr = aPtrCurrentAtt.operator->(); // to avoid ambiguity
TDF_Data_DeltaCreation
("Modification",
anAttrPtr->DeltaOnModification(backupAtt));