Skip to content

Commit

Permalink
Dropped unused functions from Filter's private API
Browse files Browse the repository at this point in the history
This should have been done back in PR #460
  • Loading branch information
veloman-yunkan committed Apr 27, 2021
1 parent 29a6a34 commit 2d76f83
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions include/library.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ class Filter {
private:
friend class Library;

bool accept(const Book& book) const;
bool acceptByQueryOnly(const Book& book) const;
bool acceptByNonQueryCriteria(const Book& book) const;
};

Expand Down
16 changes: 0 additions & 16 deletions src/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,6 @@ bool Filter::hasQuery() const
return ACTIVE(QUERY);
}

bool Filter::accept(const Book& book) const
{
return acceptByNonQueryCriteria(book) && acceptByQueryOnly(book);
}

bool Filter::acceptByNonQueryCriteria(const Book& book) const
{
auto local = !book.getPath().empty();
Expand Down Expand Up @@ -647,15 +642,4 @@ bool Filter::acceptByNonQueryCriteria(const Book& book) const
return true;
}

bool Filter::acceptByQueryOnly(const Book& book) const
{
if ( ACTIVE(QUERY)
&& !(matchRegex(book.getTitle(), "\\Q" + _query + "\\E")
|| matchRegex(book.getDescription(), "\\Q" + _query + "\\E")))
return false;

return true;

}

}

0 comments on commit 2d76f83

Please sign in to comment.