summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/buffer.cc
diff options
context:
space:
mode:
authorDoug Geiger <doug.geiger@bioradiation.net>2014-09-19 12:21:30 -0400
committerDoug Geiger <doug.geiger@bioradiation.net>2014-09-19 12:21:30 -0400
commit9c4b9fc8af447edb8ad786a9a629e583476c2a3a (patch)
treedb1bf2ed23047ab28831925e9b4db1ab1a52711f /gnuradio-runtime/lib/buffer.cc
parent3d739a40f6c4033412da8383632a72aaa35f00a0 (diff)
Fix prune_tags
Diffstat (limited to 'gnuradio-runtime/lib/buffer.cc')
-rw-r--r--gnuradio-runtime/lib/buffer.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index 079cfe310f..5ab8694862 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -251,10 +251,11 @@ namespace gr {
If this function is used elsewhere, remember to lock the
buffer's mutex al la the scoped_lock line below.
*/
- std::multimap<uint64_t, tag_t>::iterator itr = d_item_tags.lower_bound(max_time);
- while (itr != d_item_tags.end()) {
- d_item_tags.erase(itr);
- itr++;
+ 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++;
}
}