libgimpwidgets: fix GimpChainButton init().

So the minor fix on commit 3e35fe4d80 was not so minor after all, and I
should have looked more in details into its contents.

GET_PRIVATE() macro uses the `priv` pointer value hence had to be called
after gimp_chain_button_get_instance_private(). Thus the order was
important; the initialization and assignment values were actually
different. Simply let's get rid of the previous initialization of
`private` (make it declaration-only) to avoid cppcheck to (wrongfully)
complain about double variable assignment to the same value.
This commit is contained in:
Jehan 2020-11-07 18:14:58 +01:00
parent efd2af9994
commit e85dd77ad1
1 changed files with 2 additions and 1 deletions

View File

@ -192,10 +192,11 @@ gimp_chain_button_class_init (GimpChainButtonClass *klass)
static void
gimp_chain_button_init (GimpChainButton *button)
{
GimpChainButtonPrivate *private = GET_PRIVATE (button);
GimpChainButtonPrivate *private;
button->priv = gimp_chain_button_get_instance_private (button);
private = GET_PRIVATE (button);
private->position = GIMP_CHAIN_TOP;
private->active = FALSE;
private->image = gtk_image_new ();