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
|
// The severity is portability instead of error since this ub doesn't
|
||||||
// cause bad behaviour on most implementations. people create out
|
// cause bad behaviour on most implementations. people create out
|
||||||
// of bounds pointers by intention.
|
// 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;
|
std::string errmsg;
|
||||||
if (index && !index->isNumber()) {
|
if (index && !index->isNumber()) {
|
||||||
errmsg = "Undefined behaviour, when '" +
|
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("cppcheck: there is no --enable parameter with the name '" + str + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::string("");
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue