fix compilation error / clang warnings
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
|
||||
namespace Mu {
|
||||
|
||||
struct Store;
|
||||
class Store;
|
||||
|
||||
/// An object abstracting the index process.
|
||||
class Indexer {
|
||||
|
||||
@ -200,7 +200,7 @@ get_query (MuQuery *mqx, const char* searchexpr, bool raw, GError **err) try {
|
||||
Mu::WarningVec warns;
|
||||
const auto tree = Mu::parse (searchexpr, warns,
|
||||
std::make_unique<MuProc>(mqx->db()));
|
||||
for (const auto w: warns)
|
||||
for (auto&& w: warns)
|
||||
std::cerr << w << std::endl;
|
||||
|
||||
return Mu::xapian_query (tree);
|
||||
@ -514,7 +514,7 @@ mu_query_internal (MuQuery *self, const char *searchexpr,
|
||||
ss << tree;
|
||||
|
||||
if (warn) {
|
||||
for (const auto w: warns)
|
||||
for (auto&& w: warns)
|
||||
std::cerr << w << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ xapian_query_value (const Mu::Tree& tree)
|
||||
return make_query(v, parts.front(), true/*maybe-wildcard*/);
|
||||
|
||||
std::vector<Xapian::Query> phvec;
|
||||
for (const auto p: parts)
|
||||
for (const auto& p: parts)
|
||||
phvec.emplace_back(make_query(v, p, false/*no wildcards*/));
|
||||
|
||||
return Xapian::Query (Xapian::Query::OP_PHRASE, phvec.begin(), phvec.end());
|
||||
|
||||
@ -133,7 +133,7 @@ static void
|
||||
test_to_string ()
|
||||
{
|
||||
std::stringstream ss;
|
||||
for (const auto t: tokenize ("foo and bar xor not cuux or fnorb"))
|
||||
for (auto&& t: tokenize ("foo and bar xor not cuux or fnorb"))
|
||||
ss << t << ' ';
|
||||
|
||||
g_assert_true (ss.str() ==
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
constexpr auto MuLogDomain = "mu";
|
||||
static bool MuLogInitialized = false;
|
||||
static Mu::LogOptions MuLogOptions;
|
||||
static std::ofstream MuStream;
|
||||
|
||||
@ -176,8 +176,8 @@ struct Sexp {
|
||||
size_t empty() const { return seq_.empty(); }
|
||||
|
||||
private:
|
||||
friend class Sexp;
|
||||
Seq seq_;
|
||||
friend struct Sexp;
|
||||
Seq seq_;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user