diff options
author | Thomas Habets <thomas@habets.se> | 2019-11-08 20:21:30 +0000 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2019-12-04 10:13:22 -0500 |
commit | 1b85d1a7875c8ae3491009225e5134ca5734ca2e (patch) | |
tree | 58d7431551e0914c9ea76ba6952ecedca340747c /gr-blocks/lib/skiphead_impl.cc | |
parent | 25cb814aef1f8b89fd4fcf6e7577e18b0807474b (diff) |
Use C++11 ranged for and ranged insert instead of manual loops
Diffstat (limited to 'gr-blocks/lib/skiphead_impl.cc')
-rw-r--r-- | gr-blocks/lib/skiphead_impl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gr-blocks/lib/skiphead_impl.cc b/gr-blocks/lib/skiphead_impl.cc index ed6082c2d3..6a34b7b5a7 100644 --- a/gr-blocks/lib/skiphead_impl.cc +++ b/gr-blocks/lib/skiphead_impl.cc @@ -76,10 +76,9 @@ int skiphead_impl::general_work(int noutput_items, else { // nothing left to skip. copy away // Grab all tags in the window and shift their offsets appropriately get_tags_in_window(d_tags, 0, ii, ninput_items); - for (std::vector<tag_t>::iterator it = d_tags.begin(); it != d_tags.end(); - it++) { - (*it).offset -= d_nitems_to_skip; - add_item_tag(0, *it); + for (auto& tag : d_tags) { + tag.offset -= d_nitems_to_skip; + add_item_tag(0, tag); } int n_to_copy = ninput_items - ii; if (n_to_copy > 0) { |