diff options
author | Max Kellermann <max@duempel.org> | 2013-01-28 21:32:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-28 21:32:14 +0100 |
commit | 541192c9412398f0adbbaaa24c02875c49b63d72 (patch) | |
tree | 9c14747a11184fe5eb5e662825692f3879c33801 | |
parent | 2e9f054ec0bfc6dda5c605688fe64301b3a7ea91 (diff) | |
download | mpd-541192c9412398f0adbbaaa24c02875c49b63d72.tar.gz mpd-541192c9412398f0adbbaaa24c02875c49b63d72.tar.xz mpd-541192c9412398f0adbbaaa24c02875c49b63d72.zip |
db/Proxy: explicitly request first element of array
Works around gcc 4.6 bug.
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index fcdbae9f0..efaaffeba 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -110,7 +110,7 @@ G_GNUC_CONST static enum mpd_tag_type Convert(enum tag_type tag_type) { - for (auto i = tag_table; i->d != TAG_NUM_OF_ITEM_TYPES; ++i) + for (auto i = &tag_table[0]; i->d != TAG_NUM_OF_ITEM_TYPES; ++i) if (i->d == tag_type) return i->s; @@ -281,7 +281,7 @@ Convert(const struct mpd_song *song) tag->time = mpd_song_get_duration(song); tag_begin_add(tag); - for (auto i = tag_table; i->d != TAG_NUM_OF_ITEM_TYPES; ++i) + for (const auto *i = &tag_table[0]; i->d != TAG_NUM_OF_ITEM_TYPES; ++i) Copy(tag, i->d, song, i->s); tag_end_add(tag); |