[effects/presentwindows] Fix -Wint-in-bool-context
ClosedPublic

Authored by zzag on Apr 14 2018, 8:11 PM.

Details

Summary

Compiler: GCC 7.3.1
Distro: Arch Linux

Warning:

/home/vlad/KDE/src/kde/workspace/kwin/effects/presentwindows/presentwindows.cpp: In member function ‘void KWin::PresentWindowsEffect::rearrangeWindows()’:
/home/vlad/KDE/src/kde/workspace/kwin/effects/presentwindows/presentwindows.cpp:970:45: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
                 m_gridSizes[screen].columns * m_gridSizes[screen].rows &&

Diff Detail

Repository
R108 KWin
Branch
fix-present-window-warnings
Lint
No Linters Available
Unit
No Unit Test Coverage
zzag created this revision.Apr 14 2018, 8:11 PM
Restricted Application added a project: KWin. · View Herald TranscriptApr 14 2018, 8:11 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Apr 14 2018, 8:11 PM
davidedmundson accepted this revision.Apr 19 2018, 10:02 PM
davidedmundson added a subscriber: davidedmundson.

Surely this is now two cases of ints in booleans instead of one...but if the compiler prefers this one, sure.

This revision is now accepted and ready to land.Apr 19 2018, 10:02 PM
This revision was automatically updated to reflect the committed changes.