Merge branch 'stl' of git://github.com/neheb/MPD

This commit is contained in:
Max Kellermann
2020-04-08 23:03:44 +02:00
7 changed files with 12 additions and 36 deletions
+3 -5
View File
@@ -19,6 +19,8 @@
#include "AndSongFilter.hxx"
#include <algorithm>
ISongFilterPtr
AndSongFilter::Clone() const noexcept
{
@@ -54,9 +56,5 @@ AndSongFilter::ToExpression() const noexcept
bool
AndSongFilter::Match(const LightSong &song) const noexcept
{
for (const auto &i : items)
if (!i->Match(song))
return false;
return true;
return std::all_of(items.begin(), items.end(), [&song](const auto &i) { return i->Match(song); });
}