mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:46:49 +00:00
d3d9: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1a52ba0bc8
commit
417983f2da
|
@ -2401,7 +2401,7 @@ static HRESULT WINAPI d3d9_device_GetTextureStageState(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, state, value);
|
TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, state, value);
|
||||||
|
|
||||||
if (state >= sizeof(tss_lookup) / sizeof(*tss_lookup))
|
if (state >= ARRAY_SIZE(tss_lookup))
|
||||||
{
|
{
|
||||||
WARN("Invalid state %#x passed.\n", state);
|
WARN("Invalid state %#x passed.\n", state);
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
@ -2421,7 +2421,7 @@ static HRESULT WINAPI d3d9_device_SetTextureStageState(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, stage, state, value);
|
TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, stage, state, value);
|
||||||
|
|
||||||
if (state >= sizeof(tss_lookup) / sizeof(*tss_lookup))
|
if (state >= ARRAY_SIZE(tss_lookup))
|
||||||
{
|
{
|
||||||
WARN("Invalid state %#x passed.\n", state);
|
WARN("Invalid state %#x passed.\n", state);
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
|
|
@ -344,7 +344,7 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem
|
||||||
|
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
if (d3d9_elements[i].Type >= (sizeof(d3d_dtype_lookup) / sizeof(*d3d_dtype_lookup)))
|
if (d3d9_elements[i].Type >= ARRAY_SIZE(d3d_dtype_lookup))
|
||||||
{
|
{
|
||||||
WARN("Invalid element type %#x.\n", d3d9_elements[i].Type);
|
WARN("Invalid element type %#x.\n", d3d9_elements[i].Type);
|
||||||
heap_free(*wined3d_elements);
|
heap_free(*wined3d_elements);
|
||||||
|
|
Loading…
Reference in a new issue