Borland C++: Fixed compiler error. When using 'a?b:c', Borland C++ requires that 'b' and 'c' has the same types
This commit is contained in:
parent
b78845174d
commit
70620b6f80
|
@ -600,6 +600,6 @@ void CheckStl::size()
|
|||
|
||||
void CheckStl::sizeError(const Token *tok)
|
||||
{
|
||||
const std::string varname(tok ? tok->str() : "list");
|
||||
const std::string varname(tok ? tok->str().c_str() : "list");
|
||||
reportError(tok, Severity::possibleStyle, "stlSize", "Use " + varname + ".empty() instead of " + varname + ".size() to guarantee fast code." + (_settings->_verbose ? " size() can take linear time but empty() is guaranteed to take constant time." : ""));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue