From: Michael Stefaniuc Subject: include: Add an inline version of CopyRect() too. Message-Id: <20160621121652.GD16124@redhat.com> Date: Tue, 21 Jun 2016 14:16:52 +0200 Signed-off-by: Michael Stefaniuc --- Around 95 use cases. No, I do *not* want to do change RECT struct assignments to CopyRect(). include/winuser.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/winuser.h b/include/winuser.h index 157a6ef..e3b9391 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -3405,7 +3405,6 @@ WINUSERAPI INT WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,INT); #define CopyCursor(cur) ((HCURSOR)CopyIcon((HICON)(cur))) WINUSERAPI HICON WINAPI CopyIcon(HICON); WINUSERAPI HANDLE WINAPI CopyImage(HANDLE,UINT,INT,INT,UINT); -WINUSERAPI BOOL WINAPI CopyRect(RECT*,const RECT*); WINUSERAPI INT WINAPI CountClipboardFormats(void); WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL,INT); WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL,INT); @@ -4090,6 +4089,7 @@ WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list); #if !defined(__WINESRC__) || defined(WINE_NO_INLINE_RECT) +WINUSERAPI BOOL WINAPI CopyRect(RECT*,const RECT*); WINUSERAPI BOOL WINAPI EqualRect(const RECT*,const RECT*); WINUSERAPI BOOL WINAPI IsRectEmpty(const RECT*); WINUSERAPI BOOL WINAPI SetRect(LPRECT,INT,INT,INT,INT); @@ -4099,6 +4099,13 @@ WINUSERAPI BOOL WINAPI SetRectEmpty(LPRECT); /* Inline versions of common RECT helpers */ +static inline BOOL WINAPI CopyRect(RECT *dest, const RECT *src) +{ + if (!dest || !src) return FALSE; + *dest = *src; + return TRUE; +} + static inline BOOL WINAPI EqualRect(const RECT *rect1, const RECT *rect2) { if (!rect1 || !rect2) return FALSE; -- 2.4.11