Refactoring, use early continue
This commit is contained in:
parent
84aaec26e6
commit
6d86ad78ba
|
@ -9902,9 +9902,12 @@ void Tokenizer::printUnknownTypes() const
|
||||||
|
|
||||||
for (unsigned int i = 1; i <= _varId; ++i) {
|
for (unsigned int i = 1; i <= _varId; ++i) {
|
||||||
const Variable *var = _symbolDatabase->getVariableFromVarId(i);
|
const Variable *var = _symbolDatabase->getVariableFromVarId(i);
|
||||||
|
if (!var)
|
||||||
|
continue;
|
||||||
// is unknown type?
|
// is unknown type?
|
||||||
if (var && !var->type() && !var->typeStartToken()->isStandardType()) {
|
if (var->type() || var->typeStartToken()->isStandardType())
|
||||||
|
continue;
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
const Token * nameTok;
|
const Token * nameTok;
|
||||||
|
|
||||||
|
@ -9946,7 +9949,6 @@ void Tokenizer::printUnknownTypes() const
|
||||||
|
|
||||||
unknowns.insert(std::pair<std::string, const Token *>(name, nameTok));
|
unknowns.insert(std::pair<std::string, const Token *>(name, nameTok));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!unknowns.empty()) {
|
if (!unknowns.empty()) {
|
||||||
std::string last;
|
std::string last;
|
||||||
|
|
Loading…
Reference in New Issue