app, pdb: fix build warning because of discarded 'const' qualifier.

The PDB creates the array of drawables as a `const GimpItem *` and the
compiler does not like when we drop the const qualifier. So force this
const dropping with explicit type casting.
This commit is contained in:
Jehan 2020-05-26 17:19:31 +02:00
parent 151b01e530
commit 5398d15b55
2 changed files with 8 additions and 4 deletions

View File

@ -725,9 +725,11 @@ image_pick_color_invoker (GimpProcedure *procedure,
for (i = 0; i < num_drawables; i++)
{
drawable_list = g_list_prepend (drawable_list, drawables[i]);
GimpPickable *pickable = (GimpPickable *) drawables[i];
drawable_list = g_list_prepend (drawable_list, pickable);
if (! sample_merged)
gimp_pickable_flush (GIMP_PICKABLE (drawables[i]));
gimp_pickable_flush (pickable);
}
if (sample_merged)

View File

@ -481,9 +481,11 @@ HELP
for (i = 0; i < num_drawables; i++)
{
drawable_list = g_list_prepend (drawable_list, drawables[i]);
GimpPickable *pickable = (GimpPickable *) drawables[i];
drawable_list = g_list_prepend (drawable_list, pickable);
if (! sample_merged)
gimp_pickable_flush (GIMP_PICKABLE (drawables[i]));
gimp_pickable_flush (pickable);
}
if (sample_merged)