From d5c3f40613f60d4501fcf82d482ec5a1da1bff79 Mon Sep 17 00:00:00 2001 From: vro Date: Thu, 6 Mar 2014 13:31:59 +0400 Subject: [PATCH] 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 --- src/TDataStd/TDataStd_TreeNode.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); }