From: Joel Holdsworth Date: Sun, 16 Aug 2015 15:44:31 +0000 (-0600) Subject: TraceTreeItemOwner: Moved list_by_type template definition into header X-Git-Tag: pulseview-0.3.0~95 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a7dafb5c5f6ba13cf3aaa63ca491f0100e3b1153;p=pulseview.git TraceTreeItemOwner: Moved list_by_type template definition into header --- diff --git a/pv/view/tracetreeitemowner.cpp b/pv/view/tracetreeitemowner.cpp index 247e3e6d..a33a8597 100644 --- a/pv/view/tracetreeitemowner.cpp +++ b/pv/view/tracetreeitemowner.cpp @@ -103,21 +103,6 @@ set< TraceTreeItemOwner* > TraceTreeItemOwner::list_row_item_owners() return owners; } -template -set< shared_ptr > TraceTreeItemOwner::list_by_type() -{ - set< shared_ptr > items; - for (const auto &r : *this) { - shared_ptr p = dynamic_pointer_cast(r); - if (p) - items.insert(p); - } - - return items; -} - -template set< shared_ptr > TraceTreeItemOwner::list_by_type(); - pair TraceTreeItemOwner::v_extents() const { pair extents(INT_MAX, INT_MIN); diff --git a/pv/view/tracetreeitemowner.hpp b/pv/view/tracetreeitemowner.hpp index 905746d6..4c0043f6 100644 --- a/pv/view/tracetreeitemowner.hpp +++ b/pv/view/tracetreeitemowner.hpp @@ -128,7 +128,16 @@ public: * Creates a list of decendant signals filtered by type. */ template - std::set< std::shared_ptr > list_by_type(); + std::set< std::shared_ptr > list_by_type() { + std::set< std::shared_ptr > items; + for (const auto &r : *this) { + std::shared_ptr p = std::dynamic_pointer_cast(r); + if (p) + items.insert(p); + } + + return items; + } /** * Computes the vertical extents of the contents of this row item owner.