dwrite/layout: Remove unnecessary argument check from GetFontWeight().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-02-19 12:03:48 +03:00 committed by Alexandre Julliard
parent 352df11516
commit 68cfa3a411
2 changed files with 1 additions and 5 deletions

View File

@ -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;

View File

@ -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);