mpd: replace all consumers with iterators

This commit is contained in:
Andrzej Rybczak
2014-11-03 00:43:47 +01:00
parent e5b0c7a357
commit 202a21c4b3
7 changed files with 141 additions and 172 deletions

View File

@@ -558,9 +558,9 @@ void Browser::remove(const MPD::Item &item)
void Browser::fetchSupportedExtensions()
{
lm_supported_extensions.clear();
Mpd.GetSupportedExtensions([&](std::string extension) {
lm_supported_extensions.insert("." + std::move(extension));
});
MPD::StringIterator extension = Mpd.GetSupportedExtensions(), end;
for (; extension != end; ++extension)
lm_supported_extensions.insert("." + std::move(*extension));
}
/***********************************************************************/