From kde-core-devel Fri May 18 11:37:34 2007 From: David Faure Date: Fri, 18 May 2007 11:37:34 +0000 To: kde-core-devel Subject: Re: What to do about dpointers Message-Id: <200705181337.35301.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=117948831628234 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).