Francois Gouget : dwrite/tests: Avoid a couple of unneeded lstrlenW() calls.

Alexandre Julliard julliard at winehq.org
Fri Mar 22 16:06:18 CDT 2019


Module: wine
Branch: master
Commit: f72622bf0d2de2d1784763e1ea24524e58bfef44
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f72622bf0d2de2d1784763e1ea24524e58bfef44

Author: Francois Gouget <fgouget at free.fr>
Date:   Sat Mar 16 23:52:20 2019 +0100

dwrite/tests: Avoid a couple of unneeded lstrlenW() calls.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/tests/layout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 6aaf792..14b287c 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -3931,7 +3931,7 @@ static void test_SetTextAlignment(void)
         count = 0;
         hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count);
         ok(hr == S_OK, "got 0x%08x\n", hr);
-        if (lstrlenW(stringsW[i]))
+        if (stringsW[i][0])
             ok(count > 0, "got %u\n", count);
         else
             ok(count == 0, "got %u\n", count);
@@ -3981,7 +3981,7 @@ static void test_SetTextAlignment(void)
         ok(metrics.lineCount == 1, "got %d\n", metrics.lineCount);
         IDWriteTextLayout_Release(layout);
 
-        if (lstrlenW(stringsW[i]) > 0) {
+        if (stringsW[i][0]) {
             /* max width less than total run width, trailing alignment */
             hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_NO_WRAP);
             ok(hr == S_OK, "got 0x%08x\n", hr);




More information about the wine-cvs mailing list