Review Request: Remove some warnings when compiled with: ADD_DEFINITIONS( -Wall -Wextra -Weffc++ -Wstrict-null-sentinel -Wabi -Wreorder -Woverloaded-virtual)

Thiago Macieira thiago at kde.org
Sat Aug 15 13:24:08 BST 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090815/a8b5a994/attachment.sig>


More information about the kde-core-devel mailing list