comctl32: Use straight assignments instead of CopyRect().

Michael Stefaniuc mstefani at redhat.de
Fri Jul 29 05:23:39 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
The RECT pointers are known to not be NULL at those points.



 dlls/comctl32/rebar.c | 2 +-
 dlls/comctl32/tab.c   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index a6243a9..752f870 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -2389,7 +2389,7 @@ REBAR_GetRect (const REBAR_INFO *infoPtr, INT iBand, RECT *lprc)
 
     lpBand = REBAR_GetBand(infoPtr, iBand);
     /* For CCS_VERT the coordinates will be swapped - like on Windows */
-    CopyRect (lprc, &lpBand->rcBand);
+    *lprc = lpBand->rcBand;
 
     TRACE("band %d, (%s)\n", iBand, wine_dbgstr_rect(lprc));
 
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index 9806783..0ed9152 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -458,7 +458,7 @@ static BOOL TAB_InternalGetItemRect(
   /* Now, calculate the position of the item as if it were selected. */
   if (selectedRect!=NULL)
   {
-    CopyRect(selectedRect, itemRect);
+    *selectedRect = *itemRect;
 
     /* The rectangle of a selected item is a bit wider. */
     if(infoPtr->dwStyle & TCS_VERTICAL)
@@ -1729,7 +1729,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
       dis.itemState |= ODS_FOCUS;
     dis.hwndItem = infoPtr->hwnd;
     dis.hDC      = hdc;
-    CopyRect(&dis.rcItem,drawRect);
+    dis.rcItem = *drawRect;
 
     /* when extra data fits ULONG_PTR, store it directly */
     if (infoPtr->cbInfo > sizeof(LPARAM))
-- 
2.7.4



More information about the wine-patches mailing list