Kaydet (Commit) c2145978 authored tarafından Caolán McNamara's avatar Caolán McNamara

pvs-studio: Expression 'condition == MQueryExpression::AND' is always true.

Change-Id: Ib3c5a5a09eff26acabf64e4cbc2e7019ca3264e6
Reviewed-on: https://gerrit.libreoffice.org/62098
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 28acf83a
......@@ -308,15 +308,14 @@ std::vector<bool> entryMatchedByExpression(MQueryHelper* _aQuery, MQueryExpressi
result = result || elem;
}
resultVector.push_back(result);
} else if (condition == MQueryExpression::AND) {
} else {
assert(condition == MQueryExpression::AND && "only OR or AND should exist");
bool result = true;
for (auto const& elem : subquery_result)
{
result = result && elem;
}
resultVector.push_back(result);
} else {
OSL_FAIL("Unknown Expression Type");
}
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment