mpdpp: make all consumers take values, not rvalue references

This commit is contained in:
Andrzej Rybczak
2013-05-17 14:02:31 +02:00
parent e5e6de8d31
commit 2f9ab8f267
16 changed files with 38 additions and 50 deletions

View File

@@ -434,7 +434,7 @@ void SearchEngine::Search()
Mpd.AddSearch(MPD_TAG_DATE, itsConstraints[9]);
if (!itsConstraints[10].empty())
Mpd.AddSearch(MPD_TAG_COMMENT, itsConstraints[10]);
Mpd.CommitSearchSongs([this](MPD::Song &&s) {
Mpd.CommitSearchSongs([this](MPD::Song s) {
w.addItem(s);
});
return;
@@ -442,9 +442,7 @@ void SearchEngine::Search()
MPD::SongList list;
if (Config.search_in_db)
Mpd.GetDirectoryRecursive("/", [&list](MPD::Song &&s) {
list.push_back(s);
});
Mpd.GetDirectoryRecursive("/", vectorMoveInserter(list));
else
list.insert(list.end(), myPlaylist->main().beginV(), myPlaylist->main().endV());