Ouch?

Marc Mutz Marc.Mutz at uni-bielefeld.de
Fri Feb 20 01:02:52 GMT 2004


Am I the only one who finds this enum definition curious?

  enum Communication {
       NoCommunication = 0,
       Stdin = 1, Stdout = 2, Stderr = 4,
       AllOutput = 6, All = 7,
       NoRead
  };

This only works by pure luck, since All ensures NoRead = 8, keeping the 
bit flag nature of the enum intact. Maybe we should make the NoRead=8 
explicit? :)

Marc

-- 
Ich gegen meinen Bruder.
Ich und mein Bruder gegen unseren Cousin.
Ich, mein Bruder und unser Cousin gegen unsere Nachbarn.
Wir alle gegen den Fremden.
                                      -- Beduinen-Sprichwort
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040220/6b2622af/attachment.sig>


More information about the kde-core-devel mailing list