shdocvw: Assign to structs instead of using memcpy.
authorAndrew Talbot <andrew.talbot@talbotville.com>
Mon, 17 Mar 2008 21:36:56 +0000 (21:36 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 18 Mar 2008 10:15:22 +0000 (11:15 +0100)
dlls/shdocvw/classinfo.c
dlls/shdocvw/client.c
dlls/shdocvw/events.c
dlls/shdocvw/oleobject.c
dlls/shdocvw/shlinstobj.c
dlls/shdocvw/webbrowser.c

index e5435df08cb349e60a76037d3ee8e66d33640166..f054398cd925b8c823f6ab0124a962eee734f744 100644 (file)
@@ -72,7 +72,7 @@ static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface,
 
     if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) {
         WARN("Wrong GUID type: %d\n", dwGuidKind);
-        memcpy(pGUID, &IID_NULL, sizeof(GUID));
+        *pGUID = IID_NULL;
         return E_FAIL;
     }
 
index c74918a9aa63c861281bf91cdd1b1375b2e7695b..14a7f904e31463d22a02e8e67849a32a425ae65a 100644 (file)
@@ -222,7 +222,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
     *ppDoc = NULL;
 
     GetClientRect(This->hwnd, lprcPosRect);
-    memcpy(lprcClipRect, lprcPosRect, sizeof(RECT));
+    *lprcClipRect = *lprcPosRect;
 
     lpFrameInfo->cb = sizeof(*lpFrameInfo);
     lpFrameInfo->fMDIApp = FALSE;
index f12ff950832625c98c12b31c54d7285fc89e2655..2fba55c486d1589b5b3c7575b1bef0a3f1cb1db6 100644 (file)
@@ -166,7 +166,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i
 
     TRACE("(%p)->(%p)\n", This, pIID);
 
-    memcpy(pIID, &This->iid, sizeof(IID));
+    *pIID = This->iid;
     return S_OK;
 }
 
@@ -279,7 +279,7 @@ static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp,
     ret->sinks_size = 0;
     ret->container = container;
 
-    memcpy(&ret->iid, riid, sizeof(IID));
+    ret->iid = *riid;
 
     *cp = ret;
 }
index 8d05b775257acbe47f22f92ed237994c6945ae55..b8ed625b915024e3c5586d65237b32e9457e3d6f 100644 (file)
@@ -481,7 +481,7 @@ static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect,
     TRACE("(%p)->(%x %p)\n", This, dwDrawAspect, psizel);
 
     /* Tests show that dwDrawAspect is ignored */
-    memcpy(&This->extent, psizel, sizeof(SIZEL));
+    This->extent = *psizel;
     return S_OK;
 }
 
@@ -492,7 +492,7 @@ static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect,
     TRACE("(%p)->(%x, %p)\n", This, dwDrawAspect, psizel);
 
     /* Tests show that dwDrawAspect is ignored */
-    memcpy(psizel, &This->extent, sizeof(SIZEL));
+    *psizel = This->extent;
     return S_OK;
 }
 
@@ -631,10 +631,10 @@ static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface,
 
     TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
 
-    memcpy(&This->pos_rect, lprcPosRect, sizeof(RECT));
+    This->pos_rect = *lprcPosRect;
 
     if(lprcClipRect)
-        memcpy(&This->clip_rect, lprcClipRect, sizeof(RECT));
+        This->clip_rect = *lprcClipRect;
 
     if(This->shell_embedding_hwnd) {
         SetWindowPos(This->shell_embedding_hwnd, NULL,
index eaca590ca3328786c21ec46418954ed367bd8b6a..d272c91d3bce95d79bc420c8bf3b6a977ae3ca59 100644 (file)
@@ -326,7 +326,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *
     if (pInstanceObjectFactory) {
         pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
         pInstanceObjectFactory->m_cRef = 0;
-        memcpy(&pInstanceObjectFactory->m_clsidInstance, rclsid, sizeof(CLSID));
+        pInstanceObjectFactory->m_clsidInstance = *rclsid;
         pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
         IPropertyBag_AddRef(pPropertyBag);
 
index db6bea6120f80088bd3fed7979822eacfb5d19f9..df8012b9310d02cec8ea5a2f8fad130baa02824b 100644 (file)
@@ -344,7 +344,7 @@ static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left)
     if(!This->inplace)
         return E_UNEXPECTED;
 
-    memcpy(&rect, &This->pos_rect, sizeof(RECT));
+    rect = This->pos_rect;
     rect.left = Left;
 
     /* We don't really change the window position here.
@@ -372,7 +372,7 @@ static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top)
     if(!This->inplace)
         return E_UNEXPECTED;
 
-    memcpy(&rect, &This->pos_rect, sizeof(RECT));
+    rect = This->pos_rect;
     rect.top = Top;
 
     /* We don't really change the window position here.
@@ -400,9 +400,9 @@ static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width)
     if(!This->inplace)
         return E_UNEXPECTED;
 
-    memcpy(&rect, &This->pos_rect, sizeof(RECT));
+    rect = This->pos_rect;
     rect.right = rect.left+Width;
+
     /* We don't really change the window size here.
      * We just notify the embedder that he should do so. */
    return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
@@ -428,7 +428,7 @@ static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height)
     if(!This->inplace)
         return E_UNEXPECTED;
 
-    memcpy(&rect, &This->pos_rect, sizeof(RECT));
+    rect = This->pos_rect;
     rect.bottom = rect.top+Height;
 
     /* We don't really change the window size here.