From 09f5e48e012fcf9b3600ffa5ff00b0ff456b66a9 Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 20 Oct 2014 15:32:13 +0400 Subject: [PATCH] 0025397: Iteration on a tree of nodes is too slow Added "const Handle(TDataStd_TreeNode)&" for the method TDataStd_ChildNodeIterator::Value(). --- src/TDataStd/TDataStd_ChildNodeIterator.cdl | 1 + src/TDataStd/TDataStd_ChildNodeIterator.lxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TDataStd/TDataStd_ChildNodeIterator.cdl b/src/TDataStd/TDataStd_ChildNodeIterator.cdl index a47ee2e484..4c37e760f9 100644 --- a/src/TDataStd/TDataStd_ChildNodeIterator.cdl +++ b/src/TDataStd/TDataStd_ChildNodeIterator.cdl @@ -59,6 +59,7 @@ is Value(me) returns TreeNode from TDataStd; ---C++: inline + ---C++: return const & ---Purpose: Returns the current item; a null Step if there is -- no one. diff --git a/src/TDataStd/TDataStd_ChildNodeIterator.lxx b/src/TDataStd/TDataStd_ChildNodeIterator.lxx index 9b12e41260..ec4defa14c 100644 --- a/src/TDataStd/TDataStd_ChildNodeIterator.lxx +++ b/src/TDataStd/TDataStd_ChildNodeIterator.lxx @@ -28,7 +28,7 @@ inline Standard_Boolean TDataStd_ChildNodeIterator::More() const //purpose : //======================================================================= -inline Handle(TDataStd_TreeNode) TDataStd_ChildNodeIterator::Value() const +inline const Handle(TDataStd_TreeNode)& TDataStd_ChildNodeIterator::Value() const { return myNode; }