diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 7d2e14a89db..be60843e3a9 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -95,7 +95,7 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, if(!font || !graphics || !lfw) return InvalidParameter; - memcpy(lfw, &font->lfw, sizeof(LOGFONTW)); + *lfw = font->lfw; return Ok; } diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index ab8733d3dc5..508b489bea1 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1426,7 +1426,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string * width, angle). */ SelectObject(graphics->hdc, CreateFontIndirectW(&font->lfw)); GetTextMetricsW(graphics->hdc, &textmet); - memcpy(&lfw, &font->lfw, sizeof(LOGFONTW)); + lfw = font->lfw; lfw.lfHeight = roundr(((REAL)lfw.lfHeight) * rel_height); lfw.lfWidth = roundr(textmet.tmAveCharWidth * rel_width); @@ -1811,7 +1811,7 @@ GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix if(!graphics || !matrix) return InvalidParameter; - memcpy(matrix, graphics->worldtrans, sizeof(GpMatrix)); + *matrix = *graphics->worldtrans; return Ok; } diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 2a2d96c0b3d..69a95263063 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -281,7 +281,7 @@ GpStatus WINGDIPAPI GdipClonePath(GpPath* path, GpPath **clone) *clone = GdipAlloc(sizeof(GpPath)); if(!*clone) return OutOfMemory; - memcpy(*clone, path, sizeof(GpPath)); + **clone = *path; (*clone)->pathdata.Points = GdipAlloc(path->datalen * sizeof(PointF)); (*clone)->pathdata.Types = GdipAlloc(path->datalen); diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 0fe7dfe645f..0e37798594c 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -441,7 +441,7 @@ GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, if(!image || !srcRect || !srcUnit) return InvalidParameter; if(image->type == ImageTypeMetafile){ - memcpy(srcRect, &((GpMetafile*)image)->bounds, sizeof(GpRectF)); + *srcRect = ((GpMetafile*)image)->bounds; *srcUnit = ((GpMetafile*)image)->unit; } else if(image->type == ImageTypeBitmap){ diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index e6be4184bdb..2ee445829b0 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -97,7 +97,7 @@ GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone) *clone = GdipAlloc(sizeof(GpMatrix)); if(!*clone) return OutOfMemory; - memcpy(*clone, matrix, sizeof(GpMatrix)); + **clone = *matrix; return Ok; } diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 97fc99dacdf..7a692e3f607 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -75,7 +75,7 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen) *clonepen = GdipAlloc(sizeof(GpPen)); if(!*clonepen) return OutOfMemory; - memcpy(*clonepen, pen, sizeof(GpPen)); + **clonepen = *pen; GdipCloneCustomLineCap(pen->customstart, &(*clonepen)->customstart); GdipCloneCustomLineCap(pen->customend, &(*clonepen)->customend);