Module: wine Branch: master Commit: b8a3fabc0cbb7283c09fd72bd363479c7fa1524f URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8a3fabc0cbb7283c09fd72bd3...
Author: Michael Stefaniuc mstefani@redhat.de Date: Sat Jul 30 22:01:04 2016 +0200
dwrite/tests: Use SetRectEmpty() instead of memset().
Signed-off-by: Michael Stefaniuc mstefani@redhat.de Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dwrite/tests/font.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 3b402b8..6070c58 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -4316,7 +4316,7 @@ static void test_CreateGlyphRunAnalysis(void) rect.top == 0 && rect.bottom == 0, "unexpected rect\n");
/* check how origin affects bounds */ - memset(&rect, 0, sizeof(rect)); + SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); ok(hr == S_OK, "got 0x%08x\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n"); @@ -4327,7 +4327,7 @@ static void test_CreateGlyphRunAnalysis(void) DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); ok(hr == S_OK, "got 0x%08x\n", hr); - memset(&rect2, 0, sizeof(rect2)); + SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); ok(hr == S_OK, "got 0x%08x\n", hr); ok(rect.right - rect.left < rect2.right - rect2.left, "expected wider rect\n"); @@ -4339,7 +4339,7 @@ static void test_CreateGlyphRunAnalysis(void) 10.0, -5.0, &analysis); ok(hr == S_OK, "got 0x%08x\n", hr);
- memset(&rect2, 0, sizeof(rect2)); + SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); ok(hr == S_OK, "got 0x%08x\n", hr); ok(!IsRectEmpty(&rect2), "got empty rect\n"); @@ -4356,7 +4356,7 @@ static void test_CreateGlyphRunAnalysis(void) ok(hr == S_OK, "got 0x%08x\n", hr);
if (rendermodes[i] == DWRITE_RENDERING_MODE_ALIASED) { - memset(&rect, 0, sizeof(rect)); + SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); ok(hr == S_OK, "got 0x%08x\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n"); @@ -4372,7 +4372,7 @@ static void test_CreateGlyphRunAnalysis(void) ok(hr == S_OK, "got 0x%08x\n", hr); ok(IsRectEmpty(&rect), "got empty rect\n");
- memset(&rect, 0, sizeof(rect)); + SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); ok(hr == S_OK, "got 0x%08x\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n"); @@ -4393,7 +4393,7 @@ static void test_CreateGlyphRunAnalysis(void) 0.0, 0.0, &analysis); ok(hr == S_OK, "got 0x%08x\n", hr);
- memset(&rect, 0, sizeof(rect)); + SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); ok(hr == S_OK, "got 0x%08x\n", hr);