riched20: Assign to structs instead of using memcpy (with typo fixes).
authorAndrew Talbot <andrew.talbot@talbotville.com>
Thu, 13 Mar 2008 20:52:32 +0000 (20:52 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 14 Mar 2008 10:21:33 +0000 (11:21 +0100)
dlls/riched20/clipboard.c
dlls/riched20/editor.c
dlls/riched20/style.c

index e9b5cd0ef55c9a67fad3a29b7f83dd9b52dd4f18..ce986ed9f6bfb48019505dbe7a299a7fd56a1746 100644 (file)
@@ -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;
index 6aa21a7de6e09ba4b94b7f2e134ce0c190871dba..84f75721d8fb33abd025d3ff644c343ec55842b7 100644 (file)
@@ -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;
           }
index 8d67de33b03c66ea301947f8789766404e3b29d4..ffca9d6fee924f3517c597dd9707f23163cc9181 100644 (file)
@@ -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 ? */