Re: [Gimp-developer] [PATCH] Gradient-Fu Rev. 2 [was Re: [PATCH] Start of a Gradient Scripting Support]

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

 



Hi,

Shlomi Fish <shlomif@xxxxxxxxxxxxxxxxxxx> writes:

> Well, here is the up-to-date patch according to the commentary from
> the core developers that I received on the IRC.

Please see my comments on the patch and put a revised version to
Bugzilla.

> +{
> +  GimpGradientSegment *seg;
> +  int i;
> +  
> +  if (i < 0)
> +    {
> +      return NULL;
> +    }

I think you want to check index here, not the uninitialized variable
i.  Better make this a g_return_val_if_fail() though. In general you
should add such checks for all assumptions you make about function
parameters.


> +void gimp_gradient_get_segment_left_color  (GimpGradient *gradient,
> +                                            GimpGradientSegment *seg,
> +                                            GimpRGB * color)

Please try to follow the coding style and align function parameters
the same way all other GIMP functions do it. The same comment applies
to the declarations in the header file.

> +  gimp_data_dirty (GIMP_DATA(gradient));

Please insert a space before the opening bracket.


Sven

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux