[gnome-builder] buffer: whitespace cleanup and more assertions



commit 6a7eac2889e02da38792dbd48f885b6e640034ac
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 21 16:33:41 2017 -0700

    buffer: whitespace cleanup and more assertions

 libide/buffers/ide-buffer.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/libide/buffers/ide-buffer.c b/libide/buffers/ide-buffer.c
index 50014da..39e99ec 100644
--- a/libide/buffers/ide-buffer.c
+++ b/libide/buffers/ide-buffer.c
@@ -1196,6 +1196,9 @@ ide_buffer_constructed (GObject *object)
   GdkRGBA note_rgba;
   GdkRGBA warning_rgba;
 
+  g_assert (IDE_IS_BUFFER (self));
+  g_assert (IDE_IS_CONTEXT (priv->context));
+
   G_OBJECT_CLASS (ide_buffer_parent_class)->constructed (object);
 
   tag_table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER (self));
@@ -1222,28 +1225,28 @@ ide_buffer_constructed (GObject *object)
   warning_tag = gtk_text_tag_new (TAG_WARNING);
 
   if (!ide_source_style_scheme_apply_style (style_scheme, TAG_DEPRECATED, deprecated_tag))
-      apply_style (deprecated_tag,
-                   "underline", PANGO_UNDERLINE_ERROR,
-                   "underline-rgba", &deprecated_rgba,
-                   NULL);
+    apply_style (deprecated_tag,
+                 "underline", PANGO_UNDERLINE_ERROR,
+                 "underline-rgba", &deprecated_rgba,
+                 NULL);
 
   if (!ide_source_style_scheme_apply_style (style_scheme, TAG_ERROR, error_tag))
-      apply_style (error_tag,
-                   "underline", PANGO_UNDERLINE_ERROR,
-                   "underline-rgba", &error_rgba,
-                   NULL);
+    apply_style (error_tag,
+                 "underline", PANGO_UNDERLINE_ERROR,
+                 "underline-rgba", &error_rgba,
+                 NULL);
 
   if (!ide_source_style_scheme_apply_style (style_scheme, TAG_NOTE, note_tag))
-      apply_style (note_tag,
-                   "underline", PANGO_UNDERLINE_ERROR,
-                   "underline-rgba", &note_rgba,
-                   NULL);
+    apply_style (note_tag,
+                 "underline", PANGO_UNDERLINE_ERROR,
+                 "underline-rgba", &note_rgba,
+                 NULL);
 
   if (!ide_source_style_scheme_apply_style (style_scheme, TAG_NOTE, warning_tag))
-      apply_style (warning_tag,
-                   "underline", PANGO_UNDERLINE_ERROR,
-                   "underline-rgba", &warning_rgba,
-                   NULL);
+    apply_style (warning_tag,
+                 "underline", PANGO_UNDERLINE_ERROR,
+                 "underline-rgba", &warning_rgba,
+                 NULL);
 
   gtk_text_tag_table_add (tag_table, deprecated_tag);
   gtk_text_tag_table_add (tag_table, error_tag);


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