diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 247dd7317..f5dc795b2 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -28,6 +28,7 @@ #define TIMELINE_LAYOUT_HELPER_HPP #include "gui/gtk-lumiera.hpp" +#include "lib/util-coll.hpp" #include "lib/tree.hpp" #include @@ -366,7 +367,10 @@ protected: * the update_layout method. * @see update_layout() */ - std::map, Gdk::Rectangle> + std::map< std::weak_ptr + , Gdk::Rectangle + , ::util::WeakPtrComparator + > headerBoxes; /** diff --git a/tests/library/removefromsettest.cpp b/tests/library/removefromsettest.cpp index 0bc2a0da3..d2969ec8f 100644 --- a/tests/library/removefromsettest.cpp +++ b/tests/library/removefromsettest.cpp @@ -25,14 +25,14 @@ #include "lib/util-foreach.hpp" #include -#include -#include +#include #include #include #include using std::cout; using std::string; +using std::function; @@ -40,25 +40,26 @@ namespace util { namespace test { using util::for_each; - using boost::lambda::_1; - using boost::lambda::bind; using boost::lexical_cast; + using IntSet = std::set; - template void - show (COLL const& coll) + show (IntSet const& coll) { cout << "[ "; - for_each (coll, cout << _1 << ", "); + for_each (coll, [](uint elm) { cout << elm << ", "; }); cout << "]\n"; } - bool - killerselector (string description, uint candidate) + function + select_match (string description) { - return string::npos != description.find( lexical_cast (candidate)); + return [&](uint candidate) + { + return string::npos != description.find( lexical_cast (candidate)); + }; } @@ -87,11 +88,11 @@ namespace test { void test_remove (string elems_to_remove) { - std::set theSet; + IntSet theSet; for (int i=0; i<10; ++i) theSet.insert (i); - util::remove_if (theSet, bind( killerselector, elems_to_remove, _1)); + util::remove_if (theSet, select_match(elems_to_remove)); cout << "removed " << elems_to_remove << " ---> "; show (theSet); diff --git a/tests/library/util-foreach-test.cpp b/tests/library/util-foreach-test.cpp index 62c63dc95..eaa93f1a6 100644 --- a/tests/library/util-foreach-test.cpp +++ b/tests/library/util-foreach-test.cpp @@ -62,7 +62,7 @@ namespace test { // need explicit definitions here, because we use - // tr1/functional and boost::lambda at the same time + // and boost::lambda at the same time std::_Placeholder<1> _1; boost::lambda::placeholder1_type _1_; @@ -245,7 +245,7 @@ namespace test { check_ref_argument_bind (CO coll) { ANNOUNCE (assign_to_input); - function fun2(function2); + function fun2(function2); for_each (coll, function2, 5, 5, _1 ); _NL_ for_each (coll, &function2,5, 5, _1 ); _NL_