Suspicious code in revision 867140 (Left Items)

Matthias Kretz kretz at kde.org
Wed Oct 8 16:36:09 BST 2008


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.

> I guess
> that the code is correct but the Phonon::Category enum is badly defined.

Code is correct. And I don't think a AfterLastCategory enum value would make 
things better.

> - kdebase/runtime/phonon/kcm/backendselection.cpp:170
>
> breaking unconditionally from the loop? If the code is correct than I would
> suggest the usage of an if-condition instead.

Fixed.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de





More information about the kde-core-devel mailing list