Suspicous code in kdelibs-3.5.2

Thiago Macieira thiago at kde.org
Wed Apr 5 19:39:11 BST 2006


Michael Brade wrote:
>Yes, I guess so, but what is the difference if the operands are bool?
> Does it matter that bool is maybe not one bit on actual
> implementations? I wouldn't think so...

In theory, the compiler might not care if a true boolean has value 1 or 2. 
So if you had 1 and tried to do & 2, you'd end up with 0 (false).

Using |= is ok, but &= isn't. Too bad &&= doesn't exist.

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060405/8fb6e306/attachment.sig>


More information about the kde-core-devel mailing list