Commit e9c21488 authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Reserve result vector in CodeCompletionChunkConverter



Change-Id: If05c053afd0e422bb407e85bd2d403690084d637
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 9795a50f
......@@ -37,6 +37,7 @@ namespace ClangBackEnd {
void CodeCompletionChunkConverter::extractCompletionChunks(CXCompletionString completionString)
{
const uint completionChunkCount = clang_getNumCompletionChunks(completionString);
chunks.reserve(completionChunkCount);
for (uint chunkIndex = 0; chunkIndex < completionChunkCount; ++chunkIndex) {
const CodeCompletionChunk::Kind kind = chunkKind(completionString, chunkIndex);
......
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