Commit 946e4163 authored by Milian Wolff's avatar Milian Wolff
Browse files

Fix compile warnings about implicit conversions during iteration

Remove the unused indexedLocal container, we don't need it
and never really used it. I wrote this code with that bug 7 years
ago, funny how noone ever noticed!
parent e330dc90
Pipeline #127815 passed with stage
in 33 minutes and 35 seconds
......@@ -1038,8 +1038,7 @@ void DUContext::deleteLocalDeclarations()
if (d_func()->m_localDeclarations()) {
indexedLocal.append(d_func()->m_localDeclarations(), d_func()->m_localDeclarationsSize());
}
const auto currentLocalDeclarations = m_dynamicData->m_localDeclarations;
for (const LocalIndexedDeclaration& indexed : currentLocalDeclarations) {
for (const LocalIndexedDeclaration& indexed : indexedLocal) {
delete indexed.data(topContext());
}
......@@ -1468,8 +1467,7 @@ void DUContext::cleanIfNotEncountered(const QSet<DUChainBase*>& encountered)
if (d_func()->m_localDeclarations()) {
indexedLocal.append(d_func()->m_localDeclarations(), d_func()->m_localDeclarationsSize());
}
const auto currentLocalDeclarations = m_dynamicData->m_localDeclarations;
for (const LocalIndexedDeclaration& indexed : currentLocalDeclarations) {
for (const LocalIndexedDeclaration& indexed : indexedLocal) {
auto dec = indexed.data(topContext());
if (dec && !encountered.contains(dec) && (!dec->isAutoDeclaration() || !dec->hasUses())) {
delete dec;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment