From 61aa6b4653473ff9e09b5a487c67b161fd5667bc Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 30 Sep 2019 13:24:00 +0200 Subject: [PATCH] Removed alias DB = Database. --- include/sqlite.hpp | 2 -- src/lib/search.cpp | 15 ++++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/sqlite.hpp b/include/sqlite.hpp index 95cd965..bb2b6d1 100644 --- a/include/sqlite.hpp +++ b/include/sqlite.hpp @@ -112,8 +112,6 @@ private: std::unique_ptr _session; bool _connected; }; - -using DB = Database; } // namespace remwharead #endif // REMWHAREAD_SQLITE_HPP diff --git a/src/lib/search.cpp b/src/lib/search.cpp index 1900b0e..08b3b64 100644 --- a/src/lib/search.cpp +++ b/src/lib/search.cpp @@ -83,15 +83,16 @@ string Search::to_lowercase(const string &str) const return Poco::UTF8::toLower(str); } -list Search::search_tags(const string &expression, const bool is_re) +list Search::search_tags(const string &expression, + const bool is_re) const { vector> searchlist = parse_expression(expression); - list result; + list result; for (const vector &tags_or : searchlist) { - for (const DB::entry &entry : _entries) + for (const Database::entry &entry : _entries) { // Add entry to result if all tags in an OR-slice match. bool matched = true; @@ -125,15 +126,15 @@ list Search::search_tags(const string &expression, const bool is_re) return result; } -list Search::search_all(const string &expression, - const bool is_re) const +list Search::search_all(const string &expression, + const bool is_re) const { vector> searchlist = parse_expression(expression); - list result = search_tags(expression, is_re); + list result = search_tags(expression, is_re); for (const vector &terms_or : searchlist) { - for (const DB::entry &entry : _entries) + for (const Database::entry &entry : _entries) { // Add entry to result if all terms in an OR-slice match title, // description or full text.