]> sigrok.org Git - pulseview.git/commitdiff
TraceTreeItemOwner: Moved list_by_type template definition into header
authorJoel Holdsworth <redacted>
Sun, 16 Aug 2015 15:44:31 +0000 (09:44 -0600)
committerJoel Holdsworth <redacted>
Sat, 17 Oct 2015 15:20:21 +0000 (09:20 -0600)
pv/view/tracetreeitemowner.cpp
pv/view/tracetreeitemowner.hpp

index 247e3e6def6d0241c485b7bdd0469cea86cb1d9d..a33a8597538be87bc1a748833c67bfd7eb8cdea0 100644 (file)
@@ -103,21 +103,6 @@ set< TraceTreeItemOwner* > TraceTreeItemOwner::list_row_item_owners()
        return owners;
 }
 
-template<class T>
-set< shared_ptr<T> > TraceTreeItemOwner::list_by_type()
-{
-       set< shared_ptr<T> > items;
-       for (const auto &r : *this) {
-               shared_ptr<T> p = dynamic_pointer_cast<T>(r);
-               if (p)
-                       items.insert(p);
-       }
-
-       return items;
-}
-
-template set< shared_ptr<Trace> > TraceTreeItemOwner::list_by_type();
-
 pair<int, int> TraceTreeItemOwner::v_extents() const
 {
        pair<int, int> extents(INT_MAX, INT_MIN);
index 905746d6c5f956ab2787886efcb4b14ccfeea5a1..4c0043f66dd9b7b51bad1e188fe7d30297e9ed59 100644 (file)
@@ -128,7 +128,16 @@ public:
         * Creates a list of decendant signals filtered by type.
         */
        template<class T>
-       std::set< std::shared_ptr<T> > list_by_type();
+       std::set< std::shared_ptr<T> > list_by_type() {
+               std::set< std::shared_ptr<T> > items;
+               for (const auto &r : *this) {
+                       std::shared_ptr<T> p = std::dynamic_pointer_cast<T>(r);
+                       if (p)
+                               items.insert(p);
+               }
+
+               return items;
+       }
 
        /**
         * Computes the vertical extents of the contents of this row item owner.