Commit 225d73e8 authored by Milian Wolff's avatar Milian Wolff
Browse files

Only index the context once

parent 04946b00
......@@ -312,8 +312,9 @@ void CodeHighlightingInstance::highlightDUChain(DUContext* context, QHash<Declar
}
if (context->type() == DUContext::Other || context->type() == DUContext::Function) {
m_functionColorsForDeclarations[IndexedDUContext(context)] = colorsForDeclarations;
m_functionDeclarationsForColors[IndexedDUContext(context)] = declarationsForColors;
const auto indexed = IndexedDUContext(context);
m_functionColorsForDeclarations[indexed] = colorsForDeclarations;
m_functionDeclarationsForColors[indexed] = declarationsForColors;
}
const QVector<DUContext*> children = context->childContexts();
......
Markdown is supported
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