From 48d30fa4fe1776f89f91c7666f3f4bf164e5855c Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Fri, 20 Apr 2018 21:18:24 +0300 Subject: [PATCH] [effects/presentwindows] Fix -Wint-in-bool-context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 && ``` Reviewers: #kwin, davidedmundson Reviewed By: davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12209 --- effects/presentwindows/presentwindows.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index 65a1279479..dbf0cdf893 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -967,7 +967,8 @@ void PresentWindowsEffect::rearrangeWindows() // Don't rearrange if the grid is the same size as what it was before to prevent // windows moving to a better spot if one was filtered out. if (m_layoutMode == LayoutRegularGrid && - m_gridSizes[screen].columns * m_gridSizes[screen].rows && + m_gridSizes[screen].columns && + m_gridSizes[screen].rows && windows.size() < m_gridSizes[screen].columns * m_gridSizes[screen].rows && windows.size() > (m_gridSizes[screen].columns - 1) * m_gridSizes[screen].rows && windows.size() > m_gridSizes[screen].columns *(m_gridSizes[screen].rows - 1))