summaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2013-05-17 14:02:31 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2013-05-17 15:18:17 +0200
commit2f9ab8f2676da1ebf1729ff407f205e510b506da (patch)
treefe312fe9e240a3519d9e8c12cba7bd1c38b82d6e /src/browser.cpp
parente5e6de8d3154cedcf008285e3169d0480ef73d03 (diff)
mpdpp: make all consumers take values, not rvalue references
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 4328f055..a5f06ce2 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -337,18 +337,14 @@ MPD::SongList Browser::getSelectedSongs()
else
# endif // !WIN32
{
- Mpd.GetDirectoryRecursive(item.name, [&result](MPD::Song &&s) {
- result.push_back(s);
- });
+ Mpd.GetDirectoryRecursive(item.name, vectorMoveInserter(result));
}
}
else if (item.type == itSong)
result.push_back(*item.song);
else if (item.type == itPlaylist)
{
- Mpd.GetPlaylistContent(item.name, [&result](MPD::Song &&s) {
- result.push_back(s);
- });
+ Mpd.GetPlaylistContent(item.name, vectorMoveInserter(result));
}
};
for (auto it = w.begin(); it != w.end(); ++it)
@@ -415,9 +411,7 @@ void Browser::GetDirectory(std::string dir, std::string subdir)
if (isLocal())
GetLocalDirectory(list, itsBrowsedDir, false);
else
- Mpd.GetDirectory(dir, [&list](MPD::Item &&item) {
- list.push_back(item);
- });
+ Mpd.GetDirectory(dir, vectorMoveInserter(list));
# else
list = Mpd.GetDirectory(dir);
# endif // !WIN32