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

List:       kde-commits
Subject:    Re: kdelibs/kutils
From:       David Faure <faure () kde ! org>
Date:       2005-04-08 11:02:50
Message-ID: 200504081302.50478.faure () kde ! org
[Download RAW message or body]

On Friday 08 April 2005 12:38, André Wöbbeking wrote:
> On Wednesday 06 April 2005 14:40, Frans Englich wrote:
> > CVS commit by englich:
> >
> > Add a KDE 4 comment, fix some whitespace.
> >
> >
> >   M +3 -3      kcmodulecontainer.cpp   1.5
> >   M +2 -1      kcmodulecontainer.h   1.4
> >
> >
> > --- kdelibs/kutils/kcmodulecontainer.cpp  #1.4:1.5
> > @@ -57,5 +57,5 @@ class KCModuleContainer::KCModuleContain
> >                  QTabWidget *tabWidget;
> >                  int buttons;
> > -                bool hasRootKCM;
> > +                bool hasRootKCM: 1;
> >                  KPushButton *btnRootMode;
> 
> this saves 0 bytes due to alignment.
And it's even slower.

> I'm not sure if pointers are aligned to 16 or 32 bit (or even 64 bit on 64 bit platforms) 
Never 16. 32 bit on 32 bit platforms, 64 on 64 bit platforms.

> so you need at least more than two bools to save some memory.
Four.
i.e. "you need at least more than four bools before it's worth using bitfields"

-- 
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