Fixed Cppcheck warning, condition is always true
This commit is contained in:
parent
a3fbad50cb
commit
fa13179c68
|
@ -94,7 +94,6 @@ std::string Settings::addEnabled(const std::string &str)
|
||||||
return addEnabled(str.substr(prevPos));
|
return addEnabled(str.substr(prevPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handled = false;
|
|
||||||
if (str == "all") {
|
if (str == "all") {
|
||||||
std::set<std::string>::const_iterator it;
|
std::set<std::string>::const_iterator it;
|
||||||
for (it = id.begin(); it != id.end(); ++it) {
|
for (it = id.begin(); it != id.end(); ++it) {
|
||||||
|
@ -108,7 +107,7 @@ std::string Settings::addEnabled(const std::string &str)
|
||||||
if (str == "information") {
|
if (str == "information") {
|
||||||
_enabled.insert("missingInclude");
|
_enabled.insert("missingInclude");
|
||||||
}
|
}
|
||||||
} else if (!handled) {
|
} else {
|
||||||
if (str.empty())
|
if (str.empty())
|
||||||
return std::string("cppcheck: --enable parameter is empty");
|
return std::string("cppcheck: --enable parameter is empty");
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue