Refactoring: use continue
This commit is contained in:
parent
5728bd63af
commit
56c47fc6ed
|
@ -1263,12 +1263,14 @@ void SymbolDatabase::createSymbolDatabaseUnknownArrayDimensions()
|
||||||
// set all unknown array dimensions
|
// set all unknown array dimensions
|
||||||
for (std::size_t i = 1; i <= mTokenizer->varIdCount(); i++) {
|
for (std::size_t i = 1; i <= mTokenizer->varIdCount(); i++) {
|
||||||
// check each array variable
|
// check each array variable
|
||||||
if (mVariableList[i] && mVariableList[i]->isArray()) {
|
if (!mVariableList[i] || !mVariableList[i]->isArray())
|
||||||
|
continue;
|
||||||
// check each array dimension
|
// check each array dimension
|
||||||
const std::vector<Dimension>& dimensions = mVariableList[i]->dimensions();
|
const std::vector<Dimension>& dimensions = mVariableList[i]->dimensions();
|
||||||
for (std::size_t j = 0; j < dimensions.size(); j++) {
|
for (std::size_t j = 0; j < dimensions.size(); j++) {
|
||||||
Dimension &dimension = const_cast<Dimension &>(dimensions[j]);
|
Dimension &dimension = const_cast<Dimension &>(dimensions[j]);
|
||||||
if (dimension.num == 0) {
|
if (dimension.num != 0)
|
||||||
|
continue;
|
||||||
dimension.known = false;
|
dimension.known = false;
|
||||||
// check for a single token dimension
|
// check for a single token dimension
|
||||||
if (dimension.start && (dimension.start == dimension.end)) {
|
if (dimension.start && (dimension.start == dimension.end)) {
|
||||||
|
@ -1343,8 +1345,6 @@ void SymbolDatabase::createSymbolDatabaseUnknownArrayDimensions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SymbolDatabase::~SymbolDatabase()
|
SymbolDatabase::~SymbolDatabase()
|
||||||
|
|
Loading…
Reference in New Issue