Commit 48d30fa4 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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

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
parent 3fcce012
......@@ -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))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment