[gimp] libgimp: minor nitpick fixes.



commit a773e1cdc868836548c6fc8ce262b8f9c6465bdc
Author: Jehan <jehan girinstud io>
Date:   Tue May 24 23:52:15 2022 +0200

    libgimp: minor nitpick fixes.
    
    - Use GLib types even if it's the same thing here.
    - Remove one redundant test (`*sp` is already tested by the for() loop).

 libgimp/gimpgpparams-body.c | 2 +-
 libgimp/gimpprocedure.c     | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c
index 3cf347dc01..82ef835f9f 100644
--- a/libgimp/gimpgpparams-body.c
+++ b/libgimp/gimpgpparams-body.c
@@ -798,7 +798,7 @@ gimp_value_to_gp_param (const GValue *value,
     }
   else if (G_VALUE_HOLDS (value, G_TYPE_STRV))
     {
-      char **array = g_value_get_boxed (value);
+      gchar **array = g_value_get_boxed (value);
 
       param->param_type = GP_PARAM_TYPE_STRV;
 
diff --git a/libgimp/gimpprocedure.c b/libgimp/gimpprocedure.c
index e50996822c..870c4cb572 100644
--- a/libgimp/gimpprocedure.c
+++ b/libgimp/gimpprocedure.c
@@ -2086,11 +2086,10 @@ gimp_procedure_validate_args (GimpProcedure   *procedure,
                 }
               else
                 {
-                  const char **strings = g_value_get_boxed (arg);
+                  const gchar **strings = g_value_get_boxed (arg);
 
-                  for (const char **sp = strings; sp && *sp && valid; sp++)
-                    if (*sp)
-                      valid = g_utf8_validate (*sp, -1, NULL);
+                  for (const gchar **sp = strings; sp && *sp && valid; sp++)
+                    valid = g_utf8_validate (*sp, -1, NULL);
                 }
 
               if (! valid)


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