From 41a7203c28d2cc7550f1bb05f767950d388326cd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Jul 2014 17:22:39 +0200 Subject: Tag: add class const_iterator and methods begin(), end() Enables using range-based "for". --- test/test_translate_song.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_translate_song.cxx b/test/test_translate_song.cxx index bcd3e8646..374fd34a2 100644 --- a/test/test_translate_song.cxx +++ b/test/test_translate_song.cxx @@ -160,8 +160,7 @@ ToString(const Tag &tag) std::string result = buffer; - for (unsigned i = 0, n = tag.num_items; i != n; ++i) { - const TagItem &item = *tag.items[i]; + for (const auto &item : tag) { result.push_back('|'); result.append(tag_item_names[item.type]); result.push_back('='); -- cgit v1.2.3