diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 6f69ac6c3..9299b2470 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -993,7 +993,8 @@ void SymbolDatabase::createSymbolDatabaseSetScopePointers() start = const_cast(mTokenizer->list.front()); end = const_cast(mTokenizer->list.back()); } - assert(start && end); + assert(start); + assert(end); end->scope(&*it); diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index 66f4eac02..d6b844179 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -1782,7 +1782,8 @@ void TemplateSimplifier::expandTemplate( } else if (tok3->str() == "[") { brackets.push(mTokenList.back()); } else if (tok3->str() == "}") { - assert(brackets.empty() == false && brackets.top()->str() == "{"); + assert(brackets.empty() == false); + assert(brackets.top()->str() == "{"); Token::createMutualLinks(brackets.top(), mTokenList.back()); if (tok3->strAt(1) == ";") { const Token * tokSemicolon = tok3->next(); @@ -1794,11 +1795,13 @@ void TemplateSimplifier::expandTemplate( break; } } else if (tok3->str() == ")") { - assert(brackets.empty() == false && brackets.top()->str() == "("); + assert(brackets.empty() == false); + assert(brackets.top()->str() == "("); Token::createMutualLinks(brackets.top(), mTokenList.back()); brackets.pop(); } else if (tok3->str() == "]") { - assert(brackets.empty() == false && brackets.top()->str() == "["); + assert(brackets.empty() == false); + assert(brackets.top()->str() == "["); Token::createMutualLinks(brackets.top(), mTokenList.back()); brackets.pop(); } diff --git a/lib/token.cpp b/lib/token.cpp index ac91ffee6..2a33f4097 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -743,7 +743,8 @@ std::size_t Token::getStrLength(const Token *tok) std::size_t Token::getStrSize(const Token *tok) { - assert(tok != nullptr && tok->tokType() == eString); + assert(tok != nullptr); + assert(tok->tokType() == eString); const std::string &str = tok->str(); unsigned int sizeofstring = 1U; for (unsigned int i = 1U; i < str.size() - 1U; i++) {