From 8bd013db8d42019e94db5773899c6c0fd60e63fd Mon Sep 17 00:00:00 2001
From: Tim O'Shea <tim.oshea753@gmail.com>
Date: Mon, 22 Sep 2014 15:33:15 -0400
Subject: CID 1240027: runtime: clean up tag pruning using iter range

---
 gnuradio-runtime/lib/buffer.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'gnuradio-runtime/lib/buffer.cc')

diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index dc86b90aba..f00e9a04bf 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -252,10 +252,7 @@ namespace gr {
     */
     std::multimap<uint64_t, tag_t>::iterator end_itr = d_item_tags.lower_bound(max_time);
     std::multimap<uint64_t, tag_t>::iterator begin_itr = d_item_tags.begin();
-    while (begin_itr != end_itr) {
-      d_item_tags.erase(begin_itr);
-      begin_itr++;
-    }
+    d_item_tags.erase(begin_itr, end_itr);
   }
 
   long
-- 
cgit v1.2.3