Properly fixed test failure and line numbers in uselessCallsEmpty error
This commit is contained in:
parent
c6fdd2733b
commit
4ed15d87b6
|
@ -1347,7 +1347,7 @@ void CheckStl::uselessCalls()
|
|||
else if (Token::simpleMatch(tok->linkAt(2)->tokAt(-2), ", 0 )"))
|
||||
uselessCallsSubstrError(tok, true);
|
||||
} else if (Token::Match(tok, "[{}:;] %var% . empty ( ) ;") && style)
|
||||
uselessCallsEmptyError(tok);
|
||||
uselessCallsEmptyError(tok->next());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1868,7 +1868,7 @@ private:
|
|||
" v.empty();\n"
|
||||
" return v.empty();\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("[test.cpp:1]: (warning) Useless call of function 'empty()'. Did you intend to call 'clear()' instead?\n", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:2]: (warning) Useless call of function 'empty()'. Did you intend to call 'clear()' instead?\n", errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue