diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-04-28 11:19:29 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-30 20:54:01 -0700 |
commit | a4d9723341d1ccd387a612827a81c67c446948bc (patch) | |
tree | ff4968b2a4965e7c0b614b0245521d3c7b87bf89 | |
parent | ac985be8cee821595241681f12a813834023c492 (diff) | |
download | weston-a4d9723341d1ccd387a612827a81c67c446948bc.tar.gz weston-a4d9723341d1ccd387a612827a81c67c446948bc.tar.bz2 weston-a4d9723341d1ccd387a612827a81c67c446948bc.zip |
cairo-util: Kill a duplicate test
If !(x < margin), then clearly margin <= x. No need to test for it again.
-rw-r--r-- | shared/cairo-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c index 39485729..a1568ff9 100644 --- a/shared/cairo-util.c +++ b/shared/cairo-util.c @@ -500,7 +500,7 @@ theme_get_location(struct theme *t, int x, int y, if (x < margin) hlocation = THEME_LOCATION_EXTERIOR; - else if (margin <= x && x < margin + grip_size) + else if (x < margin + grip_size) hlocation = THEME_LOCATION_RESIZING_LEFT; else if (x < width - margin - grip_size) hlocation = THEME_LOCATION_INTERIOR; @@ -511,7 +511,7 @@ theme_get_location(struct theme *t, int x, int y, if (y < margin) vlocation = THEME_LOCATION_EXTERIOR; - else if (margin <= y && y < margin + grip_size) + else if (y < margin + grip_size) vlocation = THEME_LOCATION_RESIZING_TOP; else if (y < height - margin - grip_size) vlocation = THEME_LOCATION_INTERIOR; |