app: add gimp_gegl_node_has_key()

... which determines if a node's operation-class has a specific
key, and can be used instead of gimp_gegl_node_get_key() when only
existence is important, to avoid compiler warnings.

Update the rest of the code to use the new function.
This commit is contained in:
Ell
2020-04-07 13:13:20 +03:00
parent 2bd0b77ad0
commit 6c0326a4fa
4 changed files with 14 additions and 5 deletions

View File

@ -61,7 +61,7 @@ gimp_drawable_apply_operation (GimpDrawable *drawable,
filter = gimp_drawable_filter_new (drawable, undo_desc, operation, NULL);
if (gimp_drawable_supports_alpha (drawable) &&
gimp_gegl_node_get_key (operation, "needs-alpha"))
gimp_gegl_node_has_key (operation, "needs-alpha"))
{
gimp_drawable_filter_set_add_alpha (filter, TRUE);
}