Cleanup: There is no need to clear a string directly after its creation.

This commit is contained in:
orbitcowboy 2017-01-16 20:10:28 +01:00
parent ae939b1385
commit 6c71d74563
2 changed files with 2 additions and 2 deletions

View File

@ -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 '" +

View File

@ -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();
}