[gnome-builder] words: builder coding style cleanup



commit 75de63bd1d835a9f1ae3a9bcb0c4cd8da5f0bcb5
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 1 16:07:31 2017 -0700

    words: builder coding style cleanup

 libide/sourceview/ide-word-completion-provider.c |   10 ++++++----
 libide/sourceview/ide-word-completion-provider.h |   10 ++++------
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libide/sourceview/ide-word-completion-provider.c 
b/libide/sourceview/ide-word-completion-provider.c
index 83297dc..9c47da7 100644
--- a/libide/sourceview/ide-word-completion-provider.c
+++ b/libide/sourceview/ide-word-completion-provider.c
@@ -39,15 +39,18 @@ typedef struct
   GHashTable                    *all_proposals;
 
   GIcon                         *icon;
+
   gchar                         *current_word;
-  gulong                         cancel_id;
   gchar                         *name;
+
+  gulong                         cancel_id;
   gint                           interactive_delay;
   gint                           priority;
   gint                           direction;
   gint                           word_line;
   guint                          minimum_word_size;
-  gboolean                       wrap_around_flag;
+
+  guint                          wrap_around_flag : 1;
 
   /* No references, cleared in _finished_cb */
   GtkTextMark                    *start_mark;
@@ -640,8 +643,7 @@ ide_word_completion_provider_dispose (GObject *object)
 
   completion_cleanup (self);
 
-  g_free (priv->name);
-  priv->name = NULL;
+  g_clear_pointer (&priv->name, g_free);
 
   g_clear_object (&priv->icon);
   g_clear_object (&priv->search_context);
diff --git a/libide/sourceview/ide-word-completion-provider.h 
b/libide/sourceview/ide-word-completion-provider.h
index cdee685..8cec2c4 100644
--- a/libide/sourceview/ide-word-completion-provider.h
+++ b/libide/sourceview/ide-word-completion-provider.h
@@ -16,19 +16,17 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef IDE_WORD_COMPLETION_PROVIDER_H
-#define IDE_WORD_COMPLETION_PROVIDER_H
+#pragma once
 
 #include <gtksourceview/gtksource.h>
 
 G_BEGIN_DECLS
 
-#define IDE_TYPE_WORD_COMPLETION_PROVIDER (ide_word_completion_provider_get_type ())
+#define IDE_TYPE_WORD_COMPLETION_PROVIDER (ide_word_completion_provider_get_type())
 
 G_DECLARE_FINAL_TYPE (IdeWordCompletionProvider, ide_word_completion_provider, IDE, 
WORD_COMPLETION_PROVIDER, GObject)
 
-IdeWordCompletionProvider *ide_word_completion_provider_new (const gchar *name, GIcon *icon);
+IdeWordCompletionProvider *ide_word_completion_provider_new (const gchar *name,
+                                                             GIcon       *icon);
 
 G_END_DECLS
-
-#endif /* IDE_WORD_COMPLETION_PROVIDER_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]