diff options
author | Doug Geiger <doug.geiger@bioradiation.net> | 2014-09-19 12:21:30 -0400 |
---|---|---|
committer | Doug Geiger <doug.geiger@bioradiation.net> | 2014-09-19 12:21:30 -0400 |
commit | 9c4b9fc8af447edb8ad786a9a629e583476c2a3a (patch) | |
tree | db1bf2ed23047ab28831925e9b4db1ab1a52711f /gnuradio-runtime/lib/buffer.cc | |
parent | 3d739a40f6c4033412da8383632a72aaa35f00a0 (diff) |
Fix prune_tags
Diffstat (limited to 'gnuradio-runtime/lib/buffer.cc')
-rw-r--r-- | gnuradio-runtime/lib/buffer.cc | 9 |
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++; } } |