dwrite: Use SetRectEmpty() instead of memset().

Michael Stefaniuc mstefani at winehq.org
Wed Apr 12 06:20:29 CDT 2017


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/dwrite/font.c     | 4 ++--
 dlls/dwrite/freetype.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 8bf8753..b665161 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -4875,12 +4875,12 @@ static HRESULT WINAPI glyphrunanalysis_GetAlphaTextureBounds(IDWriteGlyphRunAnal
     TRACE("(%p)->(%d %p)\n", This, type, bounds);
 
     if ((UINT32)type > DWRITE_TEXTURE_CLEARTYPE_3x1) {
-        memset(bounds, 0, sizeof(*bounds));
+        SetRectEmpty(bounds);
         return E_INVALIDARG;
     }
 
     if (type != This->texture_type) {
-        memset(bounds, 0, sizeof(*bounds));
+        SetRectEmpty(bounds);
         return S_OK;
     }
 
diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c
index 2a926d7..2ad513e 100644
--- a/dlls/dwrite/freetype.c
+++ b/dlls/dwrite/freetype.c
@@ -986,12 +986,12 @@ INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace4 *fontface, UINT16 le
 
 void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap)
 {
-    memset(&bitmap->bbox, 0, sizeof(bitmap->bbox));
+    SetRectEmpty(&bitmap->bbox);
 }
 
 void freetype_get_design_glyph_bbox(IDWriteFontFace4 *fontface, UINT16 unitsperEm, UINT16 glyph, RECT *bbox)
 {
-    memset(bbox, 0, sizeof(*bbox));
+    SetRectEmpty(bbox);
 }
 
 BOOL freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap)
-- 
2.9.3




More information about the wine-patches mailing list