Commit be31d8d0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppTools: Minor optimization in CppCompletionAssistant

Change-Id: Ieb452713e9e09fce107520c4fd2a401007802e89
Reviewed-by: default avatarPrzemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent b0c3a6ba
......@@ -1365,13 +1365,11 @@ void CppCompletionAssistProcessor::globalCompletion(CPlusPlus::Scope *currentSco
for (unsigned i = 0; i < scope->memberCount(); ++i) {
addCompletionItem(scope->memberAt(i), FunctionLocalsOrder);
}
} else if (scope->isFunction()) {
Function *fun = scope->asFunction();
} else if (Function *fun = scope->asFunction()) {
for (unsigned i = 0, argc = fun->argumentCount(); i < argc; ++i) {
addCompletionItem(fun->argumentAt(i), FunctionArgumentsOrder);
}
} else if (scope->isTemplate()) {
Template *templ = scope->asTemplate();
} else if (Template *templ = scope->asTemplate()) {
for (unsigned i = 0, argc = templ->templateParameterCount(); i < argc; ++i) {
addCompletionItem(templ->templateParameterAt(i), FunctionArgumentsOrder);
}
......
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