diff --git a/src/db/Selection.cxx b/src/db/Selection.cxx index 966d8ee204..4df4d9ed8d 100644 --- a/src/db/Selection.cxx +++ b/src/db/Selection.cxx @@ -23,12 +23,6 @@ DatabaseSelection::IsFiltered() const noexcept return !uri.empty() || (filter != nullptr && !filter->IsEmpty()); } -bool -DatabaseSelection::HasOtherThanBase() const noexcept -{ - return filter != nullptr && filter->HasOtherThanBase(); -} - bool DatabaseSelection::Match(const LightSong &song) const noexcept { diff --git a/src/db/Selection.hxx b/src/db/Selection.hxx index a8c8a58c55..3841627bf2 100644 --- a/src/db/Selection.hxx +++ b/src/db/Selection.hxx @@ -46,12 +46,6 @@ struct DatabaseSelection { [[gnu::pure]] bool IsFiltered() const noexcept; - /** - * Does this selection contain constraints other than "base"? - */ - [[gnu::pure]] - bool HasOtherThanBase() const noexcept; - [[gnu::pure]] bool Match(const LightSong &song) const noexcept; }; diff --git a/src/song/Filter.cxx b/src/song/Filter.cxx index a809e4c43a..fe05592927 100644 --- a/src/song/Filter.cxx +++ b/src/song/Filter.cxx @@ -22,6 +22,7 @@ #include "util/ASCII.hxx" #include "util/UriUtil.hxx" +#include // for std::any_of() #include #include @@ -556,16 +557,6 @@ SongFilter::HasFoldCase() const noexcept }); } -bool -SongFilter::HasOtherThanBase() const noexcept -{ - return std::any_of(and_filter.GetItems().begin(), and_filter.GetItems().end(), - [=](const auto &item) { - return !dynamic_cast( - item.get()); - }); -} - const char * SongFilter::GetBase() const noexcept { diff --git a/src/song/Filter.hxx b/src/song/Filter.hxx index 3b31608757..8139bd3e02 100644 --- a/src/song/Filter.hxx +++ b/src/song/Filter.hxx @@ -79,12 +79,6 @@ public: [[gnu::pure]] bool HasFoldCase() const noexcept; - /** - * Does this filter contain constraints other than "base"? - */ - [[gnu::pure]] - bool HasOtherThanBase() const noexcept; - /** * Returns the "base" specification (if there is one) or * nullptr.