Module: wine Branch: master Commit: f0dd3efe1456d82f556188ca94aa292a9a7079c5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f0dd3efe1456d82f556188ca94...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Mon Mar 17 21:36:56 2008 +0000
shdocvw: Assign to structs instead of using memcpy.
---
dlls/shdocvw/classinfo.c | 2 +- dlls/shdocvw/client.c | 2 +- dlls/shdocvw/events.c | 4 ++-- dlls/shdocvw/oleobject.c | 8 ++++---- dlls/shdocvw/shlinstobj.c | 2 +- dlls/shdocvw/webbrowser.c | 10 +++++----- 6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/shdocvw/classinfo.c b/dlls/shdocvw/classinfo.c index e5435df..f054398 100644 --- a/dlls/shdocvw/classinfo.c +++ b/dlls/shdocvw/classinfo.c @@ -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; }
diff --git a/dlls/shdocvw/client.c b/dlls/shdocvw/client.c index c74918a..14a7f90 100644 --- a/dlls/shdocvw/client.c +++ b/dlls/shdocvw/client.c @@ -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; diff --git a/dlls/shdocvw/events.c b/dlls/shdocvw/events.c index f12ff95..2fba55c 100644 --- a/dlls/shdocvw/events.c +++ b/dlls/shdocvw/events.c @@ -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; } diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 8d05b77..b8ed625 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -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, diff --git a/dlls/shdocvw/shlinstobj.c b/dlls/shdocvw/shlinstobj.c index eaca590..d272c91 100644 --- a/dlls/shdocvw/shlinstobj.c +++ b/dlls/shdocvw/shlinstobj.c @@ -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);
diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index db6bea6..df8012b 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -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.