[gjs: 1/4] GjsPrivate: Fix indentation in function




commit 0b8d5fa865603c43ff4bdc682cb004fefecb336d
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Feb 14 12:09:38 2021 -0800

    GjsPrivate: Fix indentation in function
    
    Adding preprocessor directives to this code in a subsequent commit will
    cause clang-format to reformat parts of it, so just do it all at once.

 libgjs-private/gjs-util.c | 43 ++++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/libgjs-private/gjs-util.c b/libgjs-private/gjs-util.c
index 6599567d..88a575b9 100644
--- a/libgjs-private/gjs-util.c
+++ b/libgjs-private/gjs-util.c
@@ -36,27 +36,28 @@ gjs_format_int_alternative_output(int n)
 #endif
 }
 
-GType
-gjs_locale_category_get_type(void)
-{
-  static volatile size_t g_define_type_id__volatile = 0;
-  if (g_once_init_enter(&g_define_type_id__volatile)) {
-      static const GEnumValue v[] = {
-          { GJS_LOCALE_CATEGORY_ALL, "GJS_LOCALE_CATEGORY_ALL", "all" },
-          { GJS_LOCALE_CATEGORY_COLLATE, "GJS_LOCALE_CATEGORY_COLLATE", "collate" },
-          { GJS_LOCALE_CATEGORY_CTYPE, "GJS_LOCALE_CATEGORY_CTYPE", "ctype" },
-          { GJS_LOCALE_CATEGORY_MESSAGES, "GJS_LOCALE_CATEGORY_MESSAGES", "messages" },
-          { GJS_LOCALE_CATEGORY_MONETARY, "GJS_LOCALE_CATEGORY_MONETARY", "monetary" },
-          { GJS_LOCALE_CATEGORY_NUMERIC, "GJS_LOCALE_CATEGORY_NUMERIC", "numeric" },
-          { GJS_LOCALE_CATEGORY_TIME, "GJS_LOCALE_CATEGORY_TIME", "time" },
-          { 0, NULL, NULL }
-      };
-      GType g_define_type_id =
-        g_enum_register_static(g_intern_static_string("GjsLocaleCategory"), v);
-
-      g_once_init_leave(&g_define_type_id__volatile, g_define_type_id);
-  }
-  return g_define_type_id__volatile;
+GType gjs_locale_category_get_type(void) {
+    static volatile size_t g_define_type_id__volatile = 0;
+    if (g_once_init_enter(&g_define_type_id__volatile)) {
+        static const GEnumValue v[] = {
+            {GJS_LOCALE_CATEGORY_ALL, "GJS_LOCALE_CATEGORY_ALL", "all"},
+            {GJS_LOCALE_CATEGORY_COLLATE, "GJS_LOCALE_CATEGORY_COLLATE",
+             "collate"},
+            {GJS_LOCALE_CATEGORY_CTYPE, "GJS_LOCALE_CATEGORY_CTYPE", "ctype"},
+            {GJS_LOCALE_CATEGORY_MESSAGES, "GJS_LOCALE_CATEGORY_MESSAGES",
+             "messages"},
+            {GJS_LOCALE_CATEGORY_MONETARY, "GJS_LOCALE_CATEGORY_MONETARY",
+             "monetary"},
+            {GJS_LOCALE_CATEGORY_NUMERIC, "GJS_LOCALE_CATEGORY_NUMERIC",
+             "numeric"},
+            {GJS_LOCALE_CATEGORY_TIME, "GJS_LOCALE_CATEGORY_TIME", "time"},
+            {0, NULL, NULL}};
+        GType g_define_type_id = g_enum_register_static(
+            g_intern_static_string("GjsLocaleCategory"), v);
+
+        g_once_init_leave(&g_define_type_id__volatile, g_define_type_id);
+    }
+    return g_define_type_id__volatile;
 }
 
 /**


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