Cleanup: There is no need to clear a string directly after its creation.
This commit is contained in:
parent
ae939b1385
commit
6c71d74563
|
@ -195,7 +195,7 @@ void CheckBufferOverrun::pointerOutOfBoundsError(const Token *tok, const Token *
|
|||
// The severity is portability instead of error since this ub doesn't
|
||||
// cause bad behaviour on most implementations. people create out
|
||||
// of bounds pointers by intention.
|
||||
const std::string expr(tok ? tok->expressionString() : std::string(""));
|
||||
const std::string expr(tok ? tok->expressionString() : std::string());
|
||||
std::string errmsg;
|
||||
if (index && !index->isNumber()) {
|
||||
errmsg = "Undefined behaviour, when '" +
|
||||
|
|
|
@ -106,7 +106,7 @@ std::string Settings::addEnabled(const std::string &str)
|
|||
return std::string("cppcheck: there is no --enable parameter with the name '" + str + "'");
|
||||
}
|
||||
|
||||
return std::string("");
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue