Refactoring, use early return

This commit is contained in:
Daniel Marjamäki 2018-04-04 10:50:10 +02:00
parent 7efc4dd26e
commit 3b07b749d6
1 changed files with 30 additions and 29 deletions

View File

@ -851,7 +851,9 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes()
void SymbolDatabase::createSymbolDatabaseClassInfo() void SymbolDatabase::createSymbolDatabaseClassInfo()
{ {
if (!_tokenizer->isC()) { if (_tokenizer->isC())
return;
// fill in using info // fill in using info
for (std::list<Scope>::iterator it = scopeList.begin(); it != scopeList.end(); ++it) { for (std::list<Scope>::iterator it = scopeList.begin(); it != scopeList.end(); ++it) {
for (std::list<Scope::UsingInfo>::iterator i = it->usingList.begin(); i != it->usingList.end(); ++i) { for (std::list<Scope::UsingInfo>::iterator i = it->usingList.begin(); i != it->usingList.end(); ++i) {
@ -888,7 +890,6 @@ void SymbolDatabase::createSymbolDatabaseClassInfo()
i->type = findType(i->nameStart, it->enclosingScope); i->type = findType(i->nameStart, it->enclosingScope);
} }
} }
}
} }