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).
This commit is contained in:
Jehan 2022-05-24 23:52:15 +02:00
parent 2d192ae804
commit a773e1cdc8
2 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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)