Commit 9795a50f authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Reserve result vector in the CodeCompletionsExtractor



To prevent re-allocations.

Change-Id: I25f8d56bc8e55938e1888364414bc316da7fdf6c
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent fbd549f2
...@@ -91,6 +91,7 @@ bool CodeCompletionsExtractor::peek(const Utf8String &name) ...@@ -91,6 +91,7 @@ bool CodeCompletionsExtractor::peek(const Utf8String &name)
QVector<CodeCompletion> CodeCompletionsExtractor::extractAll() QVector<CodeCompletion> CodeCompletionsExtractor::extractAll()
{ {
QVector<CodeCompletion> codeCompletions; QVector<CodeCompletion> codeCompletions;
codeCompletions.reserve(cxCodeCompleteResults->NumResults);
while (next()) while (next())
codeCompletions.append(currentCodeCompletion_); codeCompletions.append(currentCodeCompletion_);
......
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