Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/db/Selection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 0 additions & 6 deletions src/db/Selection.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
11 changes: 1 addition & 10 deletions src/song/Filter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "util/ASCII.hxx"
#include "util/UriUtil.hxx"

#include <algorithm> // for std::any_of()
#include <cassert>

#include <stdlib.h>
Expand Down Expand Up @@ -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<const BaseSongFilter *>(
item.get());
});
}

const char *
SongFilter::GetBase() const noexcept
{
Expand Down
6 changes: 0 additions & 6 deletions src/song/Filter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading