Refactoring: use continue
This commit is contained in:
parent
5728bd63af
commit
56c47fc6ed
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue