From fa6b46ef30aa9edbe8743f5352bbf0c7a8dbfbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 23 Jun 2013 12:10:28 +0200 Subject: [PATCH] Remove dead assignments Variable deltaX and deltaY are assigned in the if-else branches, but not read again after being set in the branches. --- geometry.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 4be414cb60..f928649c0e 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -528,20 +528,16 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted, int diffY = qAbs((ymin + ymax) / 2 - (cy + ch / 2)); if (diffX < snap && diffY < snap && diffX < deltaX && diffY < deltaY) { // Snap to center of screen - deltaX = diffX; - deltaY = diffY; nx = (xmin + xmax) / 2 - cw / 2; ny = (ymin + ymax) / 2 - ch / 2; } else if (options->borderSnapZone()) { // Enhance border snap if ((nx == xmin || nx == xmax - cw) && diffY < snap && diffY < deltaY) { // Snap to vertical center on screen edge - deltaY = diffY; ny = (ymin + ymax) / 2 - ch / 2; } else if (((unrestricted ? ny == ymin : ny <= ymin) || ny == ymax - ch) && diffX < snap && diffX < deltaX) { // Snap to horizontal center on screen edge - deltaX = diffX; nx = (xmin + xmax) / 2 - cw / 2; } }