aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-12 17:22:39 +0200
committerMax Kellermann <max@duempel.org>2014-07-12 17:22:39 +0200
commit41a7203c28d2cc7550f1bb05f767950d388326cd (patch)
tree0b0970bbaf06b66ec0c0b3a50d90b3f6ef65dd20 /test
parent543a58bb874be8a510d54e91a37797b0c71b1160 (diff)
downloadmpd-41a7203c28d2cc7550f1bb05f767950d388326cd.tar.gz
mpd-41a7203c28d2cc7550f1bb05f767950d388326cd.tar.xz
mpd-41a7203c28d2cc7550f1bb05f767950d388326cd.zip
Tag: add class const_iterator and methods begin(), end()
Enables using range-based "for".
Diffstat (limited to 'test')
-rw-r--r--test/test_translate_song.cxx3
1 files changed, 1 insertions, 2 deletions
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('=');