Suspicious code in revision 867140 (Left Items)

André Wöbbeking Woebbeking at kde.org
Wed Oct 8 21:04:08 BST 2008


On Wednesday 08 October 2008, Matthias Kretz wrote:
> On Monday 06 October 2008 08:48:18 Christoph Bartoschek wrote:
> > - kdebase/runtime/phonon/kcm/devicepreference.cpp:660
> >
> > It is not idiomatic for C++ to include the last element into the
> > range.
>
> Can't say anything to that as I have not read much C++ code iterating
> over enums.

AFAIK normally you use < or more generic != as condition. 

But to define an extra enum value only to avoid using <= sounds like a 
bad advice as you've to put that extra value also into every switch 
block.




More information about the kde-core-devel mailing list