From: vro Date: Thu, 6 Mar 2014 09:31:59 +0000 (+0400) Subject: 0024645: Pointer to the last is wrong for a tree node X-Git-Tag: V6_7_1_beta~54 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=34859f05363fe47ad6aee594d0c573953350ec82;p=occt-copy.git 0024645: Pointer to the last is wrong for a tree node - An extra call to DownCast() is removed for a performance reason. - Information on last child is added to the Dump() method + fixed a problem of lost last child tree node on removal (detach) operation. - Test case for issue CR24645 --- diff --git a/src/TDataStd/TDataStd_TreeNode.cxx b/src/TDataStd/TDataStd_TreeNode.cxx index de47e20c29..2010048f5f 100644 --- a/src/TDataStd/TDataStd_TreeNode.cxx +++ b/src/TDataStd/TDataStd_TreeNode.cxx @@ -226,7 +226,7 @@ Standard_Boolean TDataStd_TreeNode::Remove () } if (Father()->HasFirst()) { - if (Handle(TDataStd_TreeNode)::DownCast(this) == Father()->First()) { + if (this == Father()->First().operator->()) { if (HasNext()) { Father()->SetFirst(Next()); }