[gnome-builder/gnome-builder-3-18] clang: avoid using g_object_set() for certain params
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-18] clang: avoid using g_object_set() for certain params
- Date: Tue, 13 Oct 2015 07:27:22 +0000 (UTC)
commit aa8804c79e7d4ac2387906efb13443ac587f7058
Author: Christian Hergert <christian hergert me>
Date: Sun Sep 27 18:20:09 2015 -0700
clang: avoid using g_object_set() for certain params
Save some overhead using gproperties for something that is essentially
internal API anyway.
plugins/clang/ide-clang-completion-item.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/plugins/clang/ide-clang-completion-item.c b/plugins/clang/ide-clang-completion-item.c
index 7d49993..8019701 100644
--- a/plugins/clang/ide-clang-completion-item.c
+++ b/plugins/clang/ide-clang-completion-item.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]