[clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Paul Beckingham
parent
13e1bf7204
commit
51870dff34
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);
|
||||
|
||||
Reference in New Issue
Block a user