riched20: Assign to structs instead of using memcpy (with typo fixes)
Andrew Talbot
andrew.talbot at talbotville.com
Thu Mar 13 15:52:32 CDT 2008
Changelog:
riched20: Assign to structs instead of using memcpy (with typo fixes).
diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c
index e9b5cd0..ce986ed 100644
--- a/dlls/riched20/clipboard.c
+++ b/dlls/riched20/clipboard.c
@@ -252,14 +252,14 @@ static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC
return foundFormat?DV_E_FORMATETC:DV_E_TYMED;
}
-static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatectIn,
+static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatetcIn,
FORMATETC *pformatetcOut)
{
DataObjectImpl *This = (DataObjectImpl*)iface;
- TRACE("(%p)->(%p,%p)\n", This, pformatectIn, pformatetcOut);
+ TRACE("(%p)->(%p,%p)\n", This, pformatetcIn, pformatetcOut);
if(pformatetcOut) {
- memcpy(pformatetcOut, pformatectIn, sizeof(FORMATETC));
+ *pformatetcOut = *pformatetcIn;
pformatetcOut->ptd = NULL;
}
return DATA_S_SAMEFORMATETC;
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 6aa21a7..84f7572 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -898,7 +898,7 @@ static void ME_RTFReadHook(RTF_Info *info) {
{
case rtfBeginGroup:
if (info->stackTop < maxStack) {
- memcpy(&info->stack[info->stackTop].fmt, &info->style->fmt, sizeof(CHARFORMAT2W));
+ info->stack[info->stackTop].fmt = info->style->fmt;
info->stack[info->stackTop].codePage = info->codePage;
info->stack[info->stackTop].unicodeLength = info->unicodeLength;
}
diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c
index 8d67de3..ffca9d6 100644
--- a/dlls/riched20/style.c
+++ b/dlls/riched20/style.c
@@ -403,7 +403,7 @@ HFONT ME_SelectStyleFont(ME_Context *c, ME_Style *s)
TRACE_(richedit_style)("font created %d\n", nEmpty);
item->hFont = s->hFont;
item->nRefs = 1;
- memcpy(&item->lfSpecs, &lf, sizeof(LOGFONTW));
+ item->lfSpecs = lf;
}
hOldFont = SelectObject(c->hDC, s->hFont);
/* should be cached too, maybe ? */
More information about the wine-patches
mailing list