Use {} as default value for zero-set flags, not nullptr
ClosedPublic

Authored by kossebau on Mar 23 2017, 9:25 PM.

Details

Summary

For some human code readers nullptr seems akward with bitflags,
(even more as QFlags is int-based -> sizeof). On quick reading
seeing a nullptr with unknown type even might result in wrong
assumption of a pointer type.
So for mental sanity of some of us using default constructor instead,
which still needs people to know it defaults to no bits set,
but that might be expected, as 0 is a usual default.

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Mar 23 2017, 9:25 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMar 23 2017, 9:25 PM
kfunk accepted this revision.Mar 23 2017, 9:39 PM
kfunk added a subscriber: kfunk.

If it makes you happy... :)

This revision is now accepted and ready to land.Mar 23 2017, 9:39 PM
This revision was automatically updated to reflect the committed changes.