fix compilation error / clang warnings

This commit is contained in:
Dirk-Jan C. Binnema
2020-07-25 11:26:08 +03:00
parent 6cea9fcd71
commit 148c906d8a
8 changed files with 11 additions and 12 deletions

View File

@ -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());

View File

@ -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() ==