[clang-tidy] Simplify boolean expressions

Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-09-27 20:53:23 -07:00
committed by Paul Beckingham
parent 13e1bf7204
commit 51870dff34
8 changed files with 25 additions and 51 deletions

View File

@@ -73,7 +73,7 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
// Debug output from Eval during compilation is useful. During evaluation
// it is mostly noise.
eval.debug (Context::getContext ().config.getInteger ("debug.parser") >= 3 ? true : false);
eval.debug (Context::getContext ().config.getInteger ("debug.parser") >= 3);
eval.compileExpression (precompiled);
for (auto& task : input)
@@ -124,7 +124,7 @@ void Filter::subset (std::vector <Task>& output)
// Debug output from Eval during compilation is useful. During evaluation
// it is mostly noise.
eval.debug (Context::getContext ().config.getInteger ("debug.parser") >= 3 ? true : false);
eval.debug (Context::getContext ().config.getInteger ("debug.parser") >= 3);
eval.compileExpression (precompiled);
output.clear ();
@@ -240,16 +240,10 @@ bool Filter::pendingOnly () const
if (countStatus)
{
if (!countPending && !countWaiting && !countRecurring)
return false;
return true;
return !(!countPending && !countWaiting && !countRecurring);
}
if (countId)
return true;
return false;
return countId != 0;
}
////////////////////////////////////////////////////////////////////////////////