mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-07 02:47:20 +02:00
[clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
13e1bf7204
commit
51870dff34
8 changed files with 25 additions and 51 deletions
11
src/CLI2.cpp
11
src/CLI2.cpp
|
@ -1492,11 +1492,9 @@ void CLI2::findIDs ()
|
|||
}
|
||||
|
||||
std::string raw = a.attribute ("raw");
|
||||
previousFilterArgWasAnOperator = (a._lextype == Lexer::Type::op &&
|
||||
previousFilterArgWasAnOperator = a._lextype == Lexer::Type::op &&
|
||||
raw != "(" &&
|
||||
raw != ")")
|
||||
? true
|
||||
: false;
|
||||
raw != ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1722,10 +1720,7 @@ void CLI2::insertIDExpr ()
|
|||
bool ascending = true;
|
||||
int low = strtol (r->first.c_str (), nullptr, 10);
|
||||
int high = strtol (r->second.c_str (), nullptr, 10);
|
||||
if (low <= high)
|
||||
ascending = true;
|
||||
else
|
||||
ascending = false;
|
||||
ascending = low <= high;
|
||||
|
||||
reconstructed.push_back (openParen);
|
||||
reconstructed.push_back (argID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue