diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index 90d7b8978..c1c29aee2 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -35,8 +35,10 @@ #include "gui/widgets/timeline/timeline-zoom-scale.hpp" #include "lib/time/timevalue.hpp" +#include "lib/util-coll.hpp" #include +#include using namespace gui::widgets; @@ -178,6 +180,7 @@ private: std::map< weak_ptr , shared_ptr + , ::util::WeakPtrComparator > timelineStates; diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 08afb5ce5..42cfaab4d 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -29,9 +29,13 @@ #include #include +#include using std::pair; +using std::list; using std::shared_ptr; +using std::weak_ptr; +using std::dynamic_pointer_cast; using namespace Gtk; using namespace lumiera; diff --git a/src/lib/util-coll.hpp b/src/lib/util-coll.hpp index e3246f433..123b5f75f 100644 --- a/src/lib/util-coll.hpp +++ b/src/lib/util-coll.hpp @@ -163,5 +163,19 @@ namespace util { + /* === generic container helpers === */ + + struct WeakPtrComparator + { + template + bool + operator() (std::weak_ptr const& l, std::weak_ptr const& r) const + { + return l.lock().get() < r.lock().get(); + } + }; + + + } // namespace util #endif /*UTIL_COLL_H*/ diff --git a/tests/core/proc/mobject/session/defs-manager-impl-test.cpp b/tests/core/proc/mobject/session/defs-manager-impl-test.cpp index 3171728a8..01f6ffadc 100644 --- a/tests/core/proc/mobject/session/defs-manager-impl-test.cpp +++ b/tests/core/proc/mobject/session/defs-manager-impl-test.cpp @@ -65,7 +65,7 @@ namespace test { bool find (const string& pID) { - return Session::current->defaults.search (Query ("pipe("+pID+")")); + return bool(Session::current->defaults.search (Query ("pipe("+pID+")"))); } diff --git a/tests/core/proc/mobject/session/defs-manager-test.cpp b/tests/core/proc/mobject/session/defs-manager-test.cpp index 1a14abfa2..bdd357c62 100644 --- a/tests/core/proc/mobject/session/defs-manager-test.cpp +++ b/tests/core/proc/mobject/session/defs-manager-test.cpp @@ -65,7 +65,7 @@ namespace test { bool find (Query& q) { - return Session::current->defaults.search (q); + return bool(Session::current->defaults.search (q)); }