Only check the value if it wasn't surely set by previous code

This commit is contained in:
Dmitry-Me 2017-09-12 23:20:07 +03:00
parent a4c20b3606
commit 37dea8a5cf
1 changed files with 4 additions and 3 deletions

View File

@ -1020,10 +1020,11 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
scope->definedType->needInitialization = Type::True;
else if (!unknown)
scope->definedType->needInitialization = Type::False;
else {
if (scope->definedType->needInitialization == Type::Unknown)
unknowns++;
}
}
} else if (scope->type == Scope::eUnion && scope->definedType->needInitialization == Type::Unknown)
scope->definedType->needInitialization = Type::True;
}