diff options
author | 2019-11-08 20:21:30 +0000 | |
---|---|---|
committer | 2019-12-04 10:13:22 -0500 | |
commit | 1b85d1a7875c8ae3491009225e5134ca5734ca2e (patch) | |
tree | 58d7431551e0914c9ea76ba6952ecedca340747c /gr-digital/lib/burst_shaper_impl.cc | |
parent | Use 'const' on more member variables (diff) | |
download | gnuradio-1b85d1a7875c8ae3491009225e5134ca5734ca2e.tar.xz gnuradio-1b85d1a7875c8ae3491009225e5134ca5734ca2e.zip |
Use C++11 ranged for and ranged insert instead of manual loops
Diffstat (limited to 'gr-digital/lib/burst_shaper_impl.cc')
-rw-r--r-- | gr-digital/lib/burst_shaper_impl.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gr-digital/lib/burst_shaper_impl.cc b/gr-digital/lib/burst_shaper_impl.cc index 98456264a..d4fb7310d 100644 --- a/gr-digital/lib/burst_shaper_impl.cc +++ b/gr-digital/lib/burst_shaper_impl.cc @@ -324,16 +324,15 @@ void burst_shaper_impl<T>::propagate_tags(int in_offset, tag_t temp_tag; std::vector<tag_t> tags; - std::vector<tag_t>::iterator it; this->get_tags_in_range(tags, 0, abs_start, abs_end); - for (it = tags.begin(); it != tags.end(); it++) { - if (!pmt::equal(it->key, d_length_tag_key)) { - if (skip && (it->offset == d_length_tag_offset)) + for (const auto& tag : tags) { + if (!pmt::equal(tag.key, d_length_tag_key)) { + if (skip && (tag.offset == d_length_tag_offset)) continue; - temp_tag = *it; - temp_tag.offset = abs_offset + it->offset - abs_start; + temp_tag = tag; + temp_tag.offset = abs_offset + tag.offset - abs_start; this->add_item_tag(0, temp_tag); } } |