Refactoring: use continue

This commit is contained in:
Daniel Marjamäki 2019-03-14 19:53:45 +01:00
parent 5728bd63af
commit 56c47fc6ed
1 changed files with 70 additions and 70 deletions

View File

@ -1263,12 +1263,14 @@ void SymbolDatabase::createSymbolDatabaseUnknownArrayDimensions()
// set all unknown array dimensions
for (std::size_t i = 1; i <= mTokenizer->varIdCount(); i++) {
// check each array variable
if (mVariableList[i] && mVariableList[i]->isArray()) {
if (!mVariableList[i] || !mVariableList[i]->isArray())
continue;
// check each array dimension
const std::vector<Dimension>& dimensions = mVariableList[i]->dimensions();
for (std::size_t j = 0; j < dimensions.size(); j++) {
Dimension &dimension = const_cast<Dimension &>(dimensions[j]);
if (dimension.num == 0) {
if (dimension.num != 0)
continue;
dimension.known = false;
// check for a single token dimension
if (dimension.start && (dimension.start == dimension.end)) {
@ -1344,8 +1346,6 @@ void SymbolDatabase::createSymbolDatabaseUnknownArrayDimensions()
}
}
}
}
}
SymbolDatabase::~SymbolDatabase()
{