Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebfa3dba authored by Pablo Ceballos's avatar Pablo Ceballos Committed by android-build-merger
Browse files

Merge "ui: Fix Rect::reduce" into nyc-dev

am: 91531884

* commit '91531884':
  ui: Fix Rect::reduce
parents ecc5613f 91531884
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -127,13 +127,13 @@ Rect Rect::reduce(const Rect& exclude) const {
        if (!(mask & (mask - 1))) {
            // power-of-2, i.e.: just one bit is set
            if (mask & 1) {
                result.right = exclude.left;
                result.right = min(result.right, exclude.left);
            } else if (mask & 2) {
                result.bottom = exclude.top;
                result.bottom = min(result.bottom, exclude.top);
            } else if (mask & 4) {
                result.left = exclude.right;
                result.left = max(result.left, exclude.right);
            } else if (mask & 8) {
                result.top = exclude.bottom;
                result.top = max(result.top, exclude.bottom);
            }
        }
    }