Hi Sven,
On Tue, Apr 20, 2010 at 08:23:44PM +0200, Sven Neumann wrote:
> You could use an interface and have your classes implement that
> interface. GObject allows interfaces to have a default implementation.
> You can for example implement common properties in an interface. There
> are few examp
Hello,
since some days I'm browsing through the Gimp-Code.
What I have seen so far looks very tidy.
But I also found some things that I would do differently, throughout
the whole code, and maybe also in the libs (I didn't looked at them in
detail).
I would do EVERY pointer set to NULL, whe
> The test
> if( template )
> makes only sense, if you can be sure that uninitialzed values
> will definitelky be NULL.
You must have missed the g_return_val_if_fail (! template ||
GIMP_IS_CONTEXT (template), NULL) .
It checks if template is NULL or a pointer to a valid GimpContext. If
template
Zitat von "Tor Lillqvist" :
>> The test
>> if( template )
>> makes only sense, if you can be sure that uninitialzed values
>> will definitelky be NULL.
>
> You must have missed the g_return_val_if_fail (! template ||
> GIMP_IS_CONTEXT (template), NULL) .
>
> It checks if template is NULL or a po
A small problem about layer groups in the git version: if I hide the layers
of a layer group by clicking on the small white triangle in the layers
dialog, then make another image active, and come back to the first image,
then the layers of the layer group are no longer hidden.
--
Olivier Lecarme
_
I can confirm this
--
BlizZarD (via www.gimpusers.com)
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
On 04/21/2010 11:58 AM, Oliver Bandel wrote:
> Zitat von "Tor Lillqvist":
>
>>> The test
>>>if( template )
>>> makes only sense, if you can be sure that uninitialzed values
>>> will definitelky be NULL.
>>
>> You must have missed the g_return_val_if_fail (! template ||
>> GIMP_IS_CONTEXT (templ
On 04/21/2010 01:58 PM, Oliver Bandel wrote:
> Even only temporarily valies, if set to a certain value,
> like 0 or NULL, will help in finding problems.
I agree, and I try to initialize all local variables that I either add
or modify the declaration of. I don't think it would be worth to commit
On 04/21/2010 02:50 PM, Olivier wrote:
> A small problem about layer groups in the git version: if I hide the
> layers of a layer group by clicking on the small white triangle in the
> layers dialog, then make another image active, and come back to the
> first image, then the layers of the layer gr
On Wed, 2010-04-21 at 13:58 +0200, Oliver Bandel wrote:
> Even only temporarily valies, if set to a certain value,
> like 0 or NULL, will help in finding problems.
Should be totally un-necessary as the compiler will warn you if your
code uses uninitialized variables. We are compiling with -Wall a
On 04/21/2010 07:53 PM, Sven Neumann wrote:
> On Wed, 2010-04-21 at 13:58 +0200, Oliver Bandel wrote:
>
>> Even only temporarily valies, if set to a certain value,
>> like 0 or NULL, will help in finding problems.
>
> Should be totally un-necessary as the compiler will warn you if your
> code uses
On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
> Example:
>
>
> ==
> /*/
> /* public functions
> /
>
> Gim
Zitat von "Sven Neumann" :
> On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
>
>> Example:
>>
>>
>> ==
>> /*/
>> /* public functions
>> *
Hi,
Zitat von "Omari Stephens" :
> On 04/21/2010 11:58 AM, Oliver Bandel wrote:
>> Zitat von "Tor Lillqvist":
>>
[...]
>> Even only temporarily valies, if set to a certain value,
>> like 0 or NULL, will help in finding problems.
>>
>> The mentioned function just was an example.
>>
>> Uninitial
Zitat von "Martin Nordholts" :
> On 04/21/2010 01:58 PM, Oliver Bandel wrote:
>> Even only temporarily valies, if set to a certain value,
>> like 0 or NULL, will help in finding problems.
>
> I agree, and I try to initialize all local variables that I either add
> or modify the declaration of. I d
Zitat von "Sven Neumann" :
> On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
>
>> Example:
>>
>>
>> ==
>> /*/
>> /* public functions
>> *
On 04/21/2010 11:45 PM, Oliver Bandel wrote:
> Zitat von "Martin Nordholts":
>
>> On 04/21/2010 01:58 PM, Oliver Bandel wrote:
>>> Even only temporarily valies, if set to a certain value,
>>> like 0 or NULL, will help in finding problems.
>>
>> I agree, and I try to initialize all local variables t
On 04/22/2010 03:54 AM, Marc Lehmann wrote:
> On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin Nordholts
> wrote:
>> The compiler doesn't catch all cases, like this one:
>>
>> #include
>> int main(int argc, char **argv)
>> {
>> int var;
>> if (argc == 2)
>> var = 42;
>> printf (
18 matches
Mail list logo