Towards packing CairoWidgets on ArdourCanvas.
[ardour.git] / libs / gtkmm2ext / waves_fastmeter.cc
index d97a92aac25eb0f0e59399b1ceac7ce1245be827..e6b973b13025826cbfaa709fd318654727a8cbd4 100644 (file)
@@ -136,24 +136,10 @@ FastMeter::~FastMeter ()
 void
 FastMeter::flush_pattern_cache ()
 {
-       Pattern10Map::iterator i1;
-       PatternBgMap::iterator ib;
-
-       for (ib = hb_pattern_cache.begin(); ib !=  hb_pattern_cache.end(); ++ib) {
-               hb_pattern_cache.erase(ib);
-       }
-
-       for (i1 = hm_pattern_cache.begin(); i1 !=  hm_pattern_cache.end(); ++i1) {
-               hm_pattern_cache.erase(i1);
-       }
-
-       for (ib = vb_pattern_cache.begin(); ib !=  vb_pattern_cache.end(); ++ib) {
-               vb_pattern_cache.erase(ib);
-       }
-
-       for (i1 = vm_pattern_cache.begin(); i1 !=  vm_pattern_cache.end(); ++i1) {
-               vm_pattern_cache.erase(i1);
-       }
+       hb_pattern_cache.clear();
+       hm_pattern_cache.clear();
+       vb_pattern_cache.clear();
+       vm_pattern_cache.clear();
 }
 
 Cairo::RefPtr<Cairo::Pattern>
@@ -604,7 +590,7 @@ FastMeter::vertical_expose (cairo_t* cr, cairo_rectangle_t* area)
        // MEMO: Normaly MATURE OS clips so called invalidated rects itself making APP free of
        //       heavy operations which OS does with graphic HW
 
-        // NOTE FROM PAUL: GTK does clip already. The invalidated rect isn't the only area 
+        // NOTE FROM PAUL: GTK does clip already. The invalidated rect isn't the only area
         // we want to clip to however, which is why this object/class is called FastMeter.
         // I have left stuff commented out as I found it when I merged from Ardour in August 2014,
         // but this commenting and the previous MEMO comment represent a misunderstanding