mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 04:54:19 -04:00
Narrow the scope of iterators
Also make sure that it is visible at first glance that iterators are not taken from temporaries.
This commit is contained in:
@ -65,8 +65,8 @@ int main(int argc, char *argv[])
|
||||
<< " bytes in tag"
|
||||
<< endl;
|
||||
|
||||
auto it = id3v2tag->frameList().begin();
|
||||
for(; it != id3v2tag->frameList().end(); it++) {
|
||||
const auto &frames = id3v2tag->frameList();
|
||||
for(auto it = frames.begin(); it != frames.end(); it++) {
|
||||
cout << (*it)->frameID();
|
||||
|
||||
if(auto comment = dynamic_cast<ID3v2::CommentsFrame *>(*it))
|
||||
@ -100,8 +100,8 @@ int main(int argc, char *argv[])
|
||||
cout << endl << "APE" << endl;
|
||||
|
||||
if(ape) {
|
||||
for(auto it = ape->itemListMap().begin();
|
||||
it != ape->itemListMap().end(); ++it)
|
||||
const auto &items = ape->itemListMap();
|
||||
for(auto it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
if((*it).second.type() != APE::Item::Binary)
|
||||
cout << (*it).first << " - \"" << (*it).second.toString() << "\"" << endl;
|
||||
|
Reference in New Issue
Block a user