From: Joel Holdsworth Date: Sun, 30 Aug 2015 15:31:17 +0000 (-0600) Subject: TraceTreeItemOwner: Removed non-const item_list accessor X-Git-Tag: pulseview-0.3.0~83 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a8743cd962b2d18082c6ddaeb554d56013919d95;p=pulseview.git TraceTreeItemOwner: Removed non-const item_list accessor --- diff --git a/pv/view/tracetreeitemowner.cpp b/pv/view/tracetreeitemowner.cpp index af11ad26..56433752 100644 --- a/pv/view/tracetreeitemowner.cpp +++ b/pv/view/tracetreeitemowner.cpp @@ -37,12 +37,7 @@ using std::vector; namespace pv { namespace view { -vector< shared_ptr >& TraceTreeItemOwner::child_items() -{ - return items_; -} - -const vector< shared_ptr >& TraceTreeItemOwner::child_items() const +const ViewItemOwner::item_list& TraceTreeItemOwner::child_items() const { return items_; } diff --git a/pv/view/tracetreeitemowner.hpp b/pv/view/tracetreeitemowner.hpp index 025c34ed..cbb74427 100644 --- a/pv/view/tracetreeitemowner.hpp +++ b/pv/view/tracetreeitemowner.hpp @@ -63,11 +63,6 @@ public: */ virtual unsigned int depth() const = 0; - /** - * Returns a list of row items owned by this object. - */ - virtual item_list& child_items(); - /** * Returns a list of row items owned by this object. */ diff --git a/pv/view/viewitemiterator.hpp b/pv/view/viewitemiterator.hpp index 179de383..eed67a93 100644 --- a/pv/view/viewitemiterator.hpp +++ b/pv/view/viewitemiterator.hpp @@ -37,14 +37,11 @@ namespace view { template class ViewItemIterator { public: - typedef typename std::conditional::value, - typename Owner::item_list::const_iterator, - typename Owner::item_list::iterator>::type child_iterator; - + typedef typename Owner::item_list::const_iterator child_iterator; typedef std::shared_ptr value_type; typedef ptrdiff_t difference_type; typedef value_type pointer; - typedef value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; public: diff --git a/pv/view/viewitemowner.hpp b/pv/view/viewitemowner.hpp index 60c85076..8d34059a 100644 --- a/pv/view/viewitemowner.hpp +++ b/pv/view/viewitemowner.hpp @@ -43,11 +43,6 @@ public: typedef ViewItemIterator const_iterator; public: - /** - * Returns a list of row items owned by this object. - */ - virtual item_list& child_items() = 0; - /** * Returns a list of row items owned by this object. */