winemac.drv: Use IsRectEmpty() instead of open coding it.
Michael Stefaniuc
mstefani at redhat.de
Tue May 3 14:47:38 CDT 2016
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
Not even compile tested. But as this is a purely generated patch there
was no opportunity for me to screw it up...
dlls/winemac.drv/macdrv.h | 2 +-
dlls/winemac.drv/window.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h
index f3b5e65..81b642c 100644
--- a/dlls/winemac.drv/macdrv.h
+++ b/dlls/winemac.drv/macdrv.h
@@ -47,7 +47,7 @@
static inline CGRect cgrect_from_rect(RECT rect)
{
- if (rect.left >= rect.right || rect.top >= rect.bottom)
+ if (IsRectEmpty(&rect))
return CGRectMake(rect.left, rect.top, 0, 0);
return CGRectMake(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
}
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c
index a48ac17..fbea49f 100644
--- a/dlls/winemac.drv/window.c
+++ b/dlls/winemac.drv/window.c
@@ -401,7 +401,7 @@ static void sync_window_region(struct macdrv_win_data *data, HRGN win_region)
*/
static inline void add_bounds_rect(RECT *bounds, const RECT *rect)
{
- if (rect->left >= rect->right || rect->top >= rect->bottom) return;
+ if (IsRectEmpty(rect)) return;
bounds->left = min(bounds->left, rect->left);
bounds->top = min(bounds->top, rect->top);
bounds->right = max(bounds->right, rect->right);
--
2.4.11
More information about the wine-patches
mailing list