Remove dead assignments
Variable deltaX and deltaY are assigned in the if-else branches, but not read again after being set in the branches.
This commit is contained in:
parent
2ea7be70b7
commit
fa6b46ef30
1 changed files with 0 additions and 4 deletions
|
@ -528,20 +528,16 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
|
||||||
int diffY = qAbs((ymin + ymax) / 2 - (cy + ch / 2));
|
int diffY = qAbs((ymin + ymax) / 2 - (cy + ch / 2));
|
||||||
if (diffX < snap && diffY < snap && diffX < deltaX && diffY < deltaY) {
|
if (diffX < snap && diffY < snap && diffX < deltaX && diffY < deltaY) {
|
||||||
// Snap to center of screen
|
// Snap to center of screen
|
||||||
deltaX = diffX;
|
|
||||||
deltaY = diffY;
|
|
||||||
nx = (xmin + xmax) / 2 - cw / 2;
|
nx = (xmin + xmax) / 2 - cw / 2;
|
||||||
ny = (ymin + ymax) / 2 - ch / 2;
|
ny = (ymin + ymax) / 2 - ch / 2;
|
||||||
} else if (options->borderSnapZone()) {
|
} else if (options->borderSnapZone()) {
|
||||||
// Enhance border snap
|
// Enhance border snap
|
||||||
if ((nx == xmin || nx == xmax - cw) && diffY < snap && diffY < deltaY) {
|
if ((nx == xmin || nx == xmax - cw) && diffY < snap && diffY < deltaY) {
|
||||||
// Snap to vertical center on screen edge
|
// Snap to vertical center on screen edge
|
||||||
deltaY = diffY;
|
|
||||||
ny = (ymin + ymax) / 2 - ch / 2;
|
ny = (ymin + ymax) / 2 - ch / 2;
|
||||||
} else if (((unrestricted ? ny == ymin : ny <= ymin) || ny == ymax - ch) &&
|
} else if (((unrestricted ? ny == ymin : ny <= ymin) || ny == ymax - ch) &&
|
||||||
diffX < snap && diffX < deltaX) {
|
diffX < snap && diffX < deltaX) {
|
||||||
// Snap to horizontal center on screen edge
|
// Snap to horizontal center on screen edge
|
||||||
deltaX = diffX;
|
|
||||||
nx = (xmin + xmax) / 2 - cw / 2;
|
nx = (xmin + xmax) / 2 - cw / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue