compare with cend

we are searching between m_oldScreenGeometries.cbegin() and
m_oldScreenGeometries.cend(), so the result can't be compared
with m_oldScreenGeometries.end()
This commit is contained in:
Marco Martin 2022-08-30 14:00:38 +02:00
parent 498bde9c6e
commit 4fe0bda4db

View file

@ -2255,7 +2255,7 @@ void Workspace::desktopResized()
const auto oldCursorOutput = std::find_if(m_oldScreenGeometries.cbegin(), m_oldScreenGeometries.cend(), [](const auto &geometry) {
return geometry.contains(Cursors::self()->mouse()->pos());
});
if (oldCursorOutput != m_oldScreenGeometries.end()) {
if (oldCursorOutput != m_oldScreenGeometries.cend()) {
const Output *cursorOutput = oldCursorOutput.key();
if (std::find(m_outputs.cbegin(), m_outputs.cend(), cursorOutput) != m_outputs.cend()) {
const QRect oldGeometry = oldCursorOutput.value();