diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-08 00:06:28 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-08 00:06:28 +0300 |
| commit | ceed832cb9ce75ae3ffab2563036b3aa745c577c (patch) | |
| tree | 7f15ae5a212b9c2e9e6aa657c2ce7a5343fa55e3 /lib | |
| parent | c3283dc5ae6ca372d599709bd51fab4dc8e17119 (diff) | |
mu-query: minor cleanups
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mu-query.cc | 16 | ||||
| -rw-r--r-- | lib/mu-query.hh | 10 |
2 files changed, 4 insertions, 22 deletions
diff --git a/lib/mu-query.cc b/lib/mu-query.cc index 5b76005..bb4ec54 100644 --- a/lib/mu-query.cc +++ b/lib/mu-query.cc @@ -18,27 +18,15 @@ */ #include <mu-query.hh> -#include <stdexcept> -#include <string> -#include <cctype> -#include <cstring> -#include <sstream> -#include <cmath> - -#include <stdlib.h> -#include <glib/gstdio.h> - #include "mu-xapian-db.hh" -#include "mu-query-results.hh" #include "mu-query-match-deciders.hh" #include "mu-query-threads.hh" - #include "mu-query-parser.hh" using namespace Mu; struct Query::Private { - Private(const Store& store) : + explicit Private(const Store& store) : store_{store}, parser_flags_{any_of(store_.message_options() & Message::Options::SupportNgrams) ? ParserFlags::SupportNgrams : ParserFlags::None} {} @@ -125,7 +113,7 @@ Query::Private::make_related_enquire(const StringSet& thread_ids, } struct ThreadKeyMaker : public Xapian::KeyMaker { - ThreadKeyMaker(const QueryMatches& matches) : match_info_(matches) {} + explicit ThreadKeyMaker(const QueryMatches& matches) : match_info_(matches) {} std::string operator()(const Xapian::Document& doc) const override { const auto it{match_info_.find(doc.get_docid())}; return (it == match_info_.end()) ? "" : it->second.thread_path; diff --git a/lib/mu-query.hh b/lib/mu-query.hh index 7ca1275..fb3628b 100644 --- a/lib/mu-query.hh +++ b/lib/mu-query.hh @@ -1,5 +1,5 @@ /* -** Copyright (C) 2008-2023 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +** Copyright (C) 2008-2024 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -20,9 +20,9 @@ #ifndef __MU_QUERY_HH__ #define __MU_QUERY_HH__ +#include <string> #include <memory> -#include <glib.h> #include <mu-store.hh> #include <mu-query-results.hh> #include <utils/mu-utils.hh> @@ -86,12 +86,6 @@ private: */ ~Query(); - /** - * Move CTOR - * - * @param other - */ - struct Private; std::unique_ptr<Private> priv_; }; |
