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:
parent
352df11516
commit
68cfa3a411
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Text format and layout
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* 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);
|
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);
|
range = get_layout_range_by_pos(layout, position);
|
||||||
*weight = range->weight;
|
*weight = range->weight;
|
||||||
|
|
||||||
|
|
|
@ -6022,7 +6022,6 @@ static void test_layout_range_length(void)
|
||||||
range.startPosition = range.length = 0;
|
range.startPosition = range.length = 0;
|
||||||
hr = IDWriteTextLayout_GetFontWeight(layout, 10, &weight, &range);
|
hr = IDWriteTextLayout_GetFontWeight(layout, 10, &weight, &range);
|
||||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||||
todo_wine
|
|
||||||
ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n",
|
ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n",
|
||||||
range.startPosition, range.length);
|
range.startPosition, range.length);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue