[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Remove some warnings when compiled with:
From:       Thiago Macieira <thiago () kde ! org>
Date:       2009-08-15 12:24:08
Message-ID: 200908151424.08362.thiago () kde ! org
[Download RAW message or body]


Jaime Torres wrote:
>> On 2009-08-15 10:20:14, Torch wrote:
>> > good idea, but please do not re-initialize properties in the ctor
>> > body, especially in a patch that is supposed to improve code quality
>> > and style ;-).
>> >
>> > so please write
>> >
>> > a::a() : m_b(123) {}
>> >
>> > instead of
>> >
>> > a::a() : m_b(0) { m_b = 123; }
>
>I imagine you are talking about the gzip Private constructor..
>
>I do not see how to initialize the zStream members in the constructor
> list (it is a struct, not a class, with only the default constructors).

Then don't initialise it in the initialisation list. Either you do it in 
the body or in the initialisation list. Not both.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic