Commit b8666379 authored by Christian Hergert's avatar Christian Hergert
Browse files

clang: avoid using g_object_set() for certain params

Save some overhead using gproperties for something that is essentially
internal API anyway.
parent 3620475d
......@@ -535,13 +535,12 @@ IdeClangCompletionItem *
ide_clang_completion_item_new (IdeRefPtr *results,
guint index)
{
CXCompletionResult *result;
IdeClangCompletionItem *ret;
CXCompletionResult *result;
ret = g_object_new (IDE_TYPE_CLANG_COMPLETION_ITEM,
"results", results,
"index", index,
NULL);
ret = g_object_new (IDE_TYPE_CLANG_COMPLETION_ITEM, NULL);
ret->results = ide_ref_ptr_ref (results);
ret->index = index;
result = ide_clang_completion_item_get_result (ret);
ret->priority = clang_getCompletionPriority (result->CompletionString);
......
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