Commit f0dd3efe authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

shdocvw: Assign to structs instead of using memcpy.

parent 15907b50
...@@ -72,7 +72,7 @@ static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface, ...@@ -72,7 +72,7 @@ static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface,
if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) { if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) {
WARN("Wrong GUID type: %d\n", dwGuidKind); WARN("Wrong GUID type: %d\n", dwGuidKind);
memcpy(pGUID, &IID_NULL, sizeof(GUID)); *pGUID = IID_NULL;
return E_FAIL; return E_FAIL;
} }
......
...@@ -222,7 +222,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface, ...@@ -222,7 +222,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
*ppDoc = NULL; *ppDoc = NULL;
GetClientRect(This->hwnd, lprcPosRect); GetClientRect(This->hwnd, lprcPosRect);
memcpy(lprcClipRect, lprcPosRect, sizeof(RECT)); *lprcClipRect = *lprcPosRect;
lpFrameInfo->cb = sizeof(*lpFrameInfo); lpFrameInfo->cb = sizeof(*lpFrameInfo);
lpFrameInfo->fMDIApp = FALSE; lpFrameInfo->fMDIApp = FALSE;
......
...@@ -166,7 +166,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i ...@@ -166,7 +166,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i
TRACE("(%p)->(%p)\n", This, pIID); TRACE("(%p)->(%p)\n", This, pIID);
memcpy(pIID, &This->iid, sizeof(IID)); *pIID = This->iid;
return S_OK; return S_OK;
} }
...@@ -279,7 +279,7 @@ static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp, ...@@ -279,7 +279,7 @@ static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp,
ret->sinks_size = 0; ret->sinks_size = 0;
ret->container = container; ret->container = container;
memcpy(&ret->iid, riid, sizeof(IID)); ret->iid = *riid;
*cp = ret; *cp = ret;
} }
......
...@@ -481,7 +481,7 @@ static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, ...@@ -481,7 +481,7 @@ static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect,
TRACE("(%p)->(%x %p)\n", This, dwDrawAspect, psizel); TRACE("(%p)->(%x %p)\n", This, dwDrawAspect, psizel);
/* Tests show that dwDrawAspect is ignored */ /* Tests show that dwDrawAspect is ignored */
memcpy(&This->extent, psizel, sizeof(SIZEL)); This->extent = *psizel;
return S_OK; return S_OK;
} }
...@@ -492,7 +492,7 @@ static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, ...@@ -492,7 +492,7 @@ static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect,
TRACE("(%p)->(%x, %p)\n", This, dwDrawAspect, psizel); TRACE("(%p)->(%x, %p)\n", This, dwDrawAspect, psizel);
/* Tests show that dwDrawAspect is ignored */ /* Tests show that dwDrawAspect is ignored */
memcpy(psizel, &This->extent, sizeof(SIZEL)); *psizel = This->extent;
return S_OK; return S_OK;
} }
...@@ -631,10 +631,10 @@ static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface, ...@@ -631,10 +631,10 @@ static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface,
TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect); TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
memcpy(&This->pos_rect, lprcPosRect, sizeof(RECT)); This->pos_rect = *lprcPosRect;
if(lprcClipRect) if(lprcClipRect)
memcpy(&This->clip_rect, lprcClipRect, sizeof(RECT)); This->clip_rect = *lprcClipRect;
if(This->shell_embedding_hwnd) { if(This->shell_embedding_hwnd) {
SetWindowPos(This->shell_embedding_hwnd, NULL, SetWindowPos(This->shell_embedding_hwnd, NULL,
......
...@@ -326,7 +326,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag * ...@@ -326,7 +326,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *
if (pInstanceObjectFactory) { if (pInstanceObjectFactory) {
pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl; pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
pInstanceObjectFactory->m_cRef = 0; pInstanceObjectFactory->m_cRef = 0;
memcpy(&pInstanceObjectFactory->m_clsidInstance, rclsid, sizeof(CLSID)); pInstanceObjectFactory->m_clsidInstance = *rclsid;
pInstanceObjectFactory->m_pPropertyBag = pPropertyBag; pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
IPropertyBag_AddRef(pPropertyBag); IPropertyBag_AddRef(pPropertyBag);
......
...@@ -344,7 +344,7 @@ static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left) ...@@ -344,7 +344,7 @@ static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left)
if(!This->inplace) if(!This->inplace)
return E_UNEXPECTED; return E_UNEXPECTED;
memcpy(&rect, &This->pos_rect, sizeof(RECT)); rect = This->pos_rect;
rect.left = Left; rect.left = Left;
/* We don't really change the window position here. /* We don't really change the window position here.
...@@ -372,7 +372,7 @@ static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top) ...@@ -372,7 +372,7 @@ static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top)
if(!This->inplace) if(!This->inplace)
return E_UNEXPECTED; return E_UNEXPECTED;
memcpy(&rect, &This->pos_rect, sizeof(RECT)); rect = This->pos_rect;
rect.top = Top; rect.top = Top;
/* We don't really change the window position here. /* We don't really change the window position here.
...@@ -400,9 +400,9 @@ static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width) ...@@ -400,9 +400,9 @@ static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width)
if(!This->inplace) if(!This->inplace)
return E_UNEXPECTED; return E_UNEXPECTED;
memcpy(&rect, &This->pos_rect, sizeof(RECT)); rect = This->pos_rect;
rect.right = rect.left+Width; rect.right = rect.left+Width;
/* We don't really change the window size here. /* We don't really change the window size here.
* We just notify the embedder that he should do so. */ * We just notify the embedder that he should do so. */
return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect); return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
...@@ -428,7 +428,7 @@ static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height) ...@@ -428,7 +428,7 @@ static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height)
if(!This->inplace) if(!This->inplace)
return E_UNEXPECTED; return E_UNEXPECTED;
memcpy(&rect, &This->pos_rect, sizeof(RECT)); rect = This->pos_rect;
rect.bottom = rect.top+Height; rect.bottom = rect.top+Height;
/* We don't really change the window size here. /* We don't really change the window size here.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment