From ceed832cb9ce75ae3ffab2563036b3aa745c577c Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 8 May 2024 00:06:28 +0300 Subject: [PATCH] mu-query: minor cleanups --- lib/mu-query.cc | 16 ++-------------- 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 5b76005b..bb4ec54a 100644 --- a/lib/mu-query.cc +++ b/lib/mu-query.cc @@ -18,27 +18,15 @@ */ #include -#include -#include -#include -#include -#include -#include - -#include -#include - #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 7ca1275e..fb3628bc 100644 --- a/lib/mu-query.hh +++ b/lib/mu-query.hh @@ -1,5 +1,5 @@ /* -** Copyright (C) 2008-2023 Dirk-Jan C. Binnema +** Copyright (C) 2008-2024 Dirk-Jan C. Binnema ** ** 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 #include -#include #include #include #include @@ -86,12 +86,6 @@ private: */ ~Query(); - /** - * Move CTOR - * - * @param other - */ - struct Private; std::unique_ptr priv_; };