mpd: use lambda closures instead of passing vectors to functions

This commit is contained in:
Andrzej Rybczak
2012-08-28 06:01:56 +02:00
parent 4a0026052f
commit a20a195225
14 changed files with 178 additions and 164 deletions

View File

@@ -605,3 +605,11 @@ void Playlist::SetSelectedItemsPriority(int prio)
if (Mpd.CommitCommandsList())
ShowMessage("Priority set");
}
bool Playlist::checkForSong (const MPD::Song &s)
{
for (size_t i = 0; i < Items->Size(); ++i)
if (s.getHash() == (*Items)[i].getHash())
return true;
return false;
}