Nikolay Sivov : dwrite/layout: Remove unnecessary argument check from GetFontWeight().
Alexandre Julliard
julliard at winehq.org
Fri Feb 19 17:20:09 CST 2021
Module: wine
Branch: master
Commit: 68cfa3a4117fdf52498c7d22b3c0d10d7ff05c77
URL: https://source.winehq.org/git/wine.git/?a=commit;h=68cfa3a4117fdf52498c7d22b3c0d10d7ff05c77
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Feb 19 12:03:48 2021 +0300
dwrite/layout: Remove unnecessary argument check from GetFontWeight().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dwrite/layout.c | 5 +----
dlls/dwrite/tests/layout.c | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 3793f1ed8cb..482fcc733db 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -1,7 +1,7 @@
/*
* Text format and layout
*
- * Copyright 2012, 2014-2017 Nikolay Sivov for CodeWeavers
+ * Copyright 2012, 2014-2021 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -3442,9 +3442,6 @@ static HRESULT WINAPI dwritetextlayout_layout_GetFontWeight(IDWriteTextLayout4 *
TRACE("%p, %u, %p, %p.\n", iface, position, weight, r);
- if (position >= layout->len)
- return S_OK;
-
range = get_layout_range_by_pos(layout, position);
*weight = range->weight;
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index b37cdfbf5ba..b96ff2f0289 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -6022,7 +6022,6 @@ static void test_layout_range_length(void)
range.startPosition = range.length = 0;
hr = IDWriteTextLayout_GetFontWeight(layout, 10, &weight, &range);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-todo_wine
ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n",
range.startPosition, range.length);
More information about the wine-cvs
mailing list