Travis; Fix Cppcheck warnings

This commit is contained in:
Daniel Marjamäki 2020-12-02 22:02:20 +01:00
parent cbb388d458
commit 4d497712fb
1 changed files with 2 additions and 2 deletions

View File

@ -5706,13 +5706,13 @@ void SymbolDatabase::setValueType(Token *tok, const ValueType &valuetype)
if (ternary || parent->isArithmeticalOp() || parent->tokType() == Token::eIncDecOp) {
// CONTAINER + pointer => CONTAINER
if (parent->str() == "+" && vt1 && vt1->type == ValueType::Type::CONTAINER && vt2 && vt2->pointer != 0) {
if (parent->str() == "+" && vt1->type == ValueType::Type::CONTAINER && vt2 && vt2->pointer != 0) {
setValueType(parent, *vt1);
return;
}
// pointer + CONTAINER => CONTAINER
if (parent->str() == "+" && vt1 && vt1->pointer != 0U && vt2 && vt2->type == ValueType::Type::CONTAINER) {
if (parent->str() == "+" && vt1->pointer != 0U && vt2 && vt2->type == ValueType::Type::CONTAINER) {
setValueType(parent, *vt2);
return;
}