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

List:       kde-core-devel
Subject:    Re: What to do about dpointers
From:       David Faure <faure () kde ! org>
Date:       2007-05-18 11:37:34
Message-ID: 200705181337.35301.faure () kde ! org
[Download RAW message or body]

On Friday 18 May 2007, Andreas Pakulat wrote:
> Hi,
> 
> I'd like to know what do you kdelibs people do wrt to classes that don't
> have private members (at the moment) and no dpointer? Do you add a
> dpointer and private class and just initialize the dpointer to 0? Whats
> the common practice for this?

Assuming this is about exported and installed classes only,
the common practice would be to add a d pointer and move all member vars
into it (the krazy check warns about a lack of d pointers, but also about member
variables). Exceptions would be if some public method needs to be inline for 
speed reasons but that's probably not the case in kdelibs (as it is in e.g. QString).

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

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