D23948: Don't initialize QFlags<T> with 0 value

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION SUMMARY
  clang-tidy has a check that converts all usages of null pointer literals
  to nullptr keyword. However, there's a small issue related to QFlags<T>.
  
  Apparently, QFlags<T> has a constructor that takes a pointer and if you
  pass 0 to it, clang-tidy will replace 0 with nullptr, e.g.
  
    NET::States(0) -> NET::States(nullptr)
  
  Even though passing nullptr is totally correct, it looks very weird.

TEST PLAN
  Complies.

REPOSITORY
  R108 KWin

BRANCH
  default-initialization-qflags

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

AFFECTED FILES
  abstract_client.cpp
  client.cpp
  geometry.cpp

To: zzag, #kwin
Cc: kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.