Skip to content

Commit 04bc58d

Browse files
committed
enabled and fixed readability-simplify-boolean-expr clang-tidy warnings
1 parent cb9a9a2 commit 04bc58d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Checks: >
4242
-readability-isolate-declaration,
4343
-readability-magic-numbers,
4444
-readability-redundant-inline-specifier,
45-
-readability-simplify-boolean-expr,
4645
-readability-use-concise-preprocessor-directives,
4746
-readability-uppercase-literal-suffix,
4847
-performance-avoid-endl,

simplecpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
859859
return;
860860
}
861861
const std::string endOfRawString(')' + delim + currentToken);
862-
while (stream.good() && !(endsWith(currentToken, endOfRawString) && currentToken.size() > 1))
862+
while (stream.good() && (!endsWith(currentToken, endOfRawString) || currentToken.size() <= 1))
863863
currentToken += stream.readChar();
864864
if (!endsWith(currentToken, endOfRawString)) {
865865
if (outputList) {
@@ -2053,7 +2053,7 @@ namespace simplecpp {
20532053
}
20542054

20552055
const Token *recursiveExpandToken(TokenList &output, TokenList &temp, const Location &loc, const Token *tok, const MacroMap &macros, const std::set<TokenString> &expandedmacros, const std::vector<const Token*> &parametertokens) const {
2056-
if (!(temp.cback() && temp.cback()->name && tok->next && tok->next->op == '(')) {
2056+
if (!temp.cback() || !temp.cback()->name || !tok->next || tok->next->op != '(') {
20572057
output.takeTokens(temp);
20582058
return tok->next;
20592059
}

0 commit comments

Comments
 (0)