summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-20 19:26:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-21 22:02:51 +0200
commitc2145978f64d24260df88b7ebf86f5fc48149914 (patch)
treee32801689668ec38ea070b30e958e43bae1a6ac0
parent28acf83a9c07081d8a818f1dddb74b48d0188512 (diff)
pvs-studio: Expression 'condition == MQueryExpression::AND' is always true.
Change-Id: Ib3c5a5a09eff26acabf64e4cbc2e7019ca3264e6 Reviewed-on: https://gerrit.libreoffice.org/62098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 307613f936fd..f53e7e619cef 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -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 {