[Differential] [Commented On] D3580: Investigate warnings and fix where it's possible and needed (kdevplatform) [1]

ematirov (Mikhail Ivchenko) noreply at phabricator.kde.org
Sat Dec 3 16:07:02 UTC 2016


ematirov added inline comments.

INLINE COMMENTS

> documentclassesfolder.cpp:233
>      // Don't insert unknown or forward declarations into the class browser
> -    if ( (item.kind & CodeModelItem::Unknown) || (item.kind & CodeModelItem::ForwardDeclaration) )
> +    if ( CodeModelItem::Unknown || (item.kind & CodeModelItem::ForwardDeclaration) )
>        continue;

Testing for CodeModelItem::Unknown makes no sense there since it's constant (0).
The problem of original check is that (item.kind & 0) == 0 with any value of item.kind, so it doesn't check anything.

Probably solutions are:

1. check if item.kind is equal to CodeModelItem::Unknown instead of using bitwise operation there;
2. change value of CodeModelItem::Unknown to some power of 2 which is not used yet in CodeModelItem::Kind values.

Probably first one will go but I'll prefer to hear @kfunk's opinion on that

REPOSITORY
  R33 KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D3580

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: spencerb, #kdevelop, kfunk, ematirov
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161203/e3863b5e/attachment.html>


More information about the KDevelop-devel mailing list