Commit 45aaffd1 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Use ARRAY_SIZE() macro.

parent acd7d2e0
......@@ -386,7 +386,7 @@ static HRESULT d3d_query_init(struct d3d_query *query, struct d3d_device *device
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE */ WINED3D_QUERY_TYPE_SO_OVERFLOW,
};
if (desc->Query >= sizeof(query_type_map) / sizeof(*query_type_map))
if (desc->Query >= ARRAY_SIZE(query_type_map))
{
FIXME("Unhandled query type %#x.\n", desc->Query);
return E_INVALIDARG;
......
......@@ -118,7 +118,7 @@ HRESULT WINAPI D3D11CoreRegisterLayers(void)
{DXGI_DEVICE_LAYER_D3D10_DEVICE, layer_init, layer_get_size, layer_create, layer_set_feature_level},
};
DXGID3D10RegisterLayers(layers, sizeof(layers)/sizeof(*layers));
DXGID3D10RegisterLayers(layers, ARRAY_SIZE(layers));
return S_OK;
}
......@@ -265,7 +265,7 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t
if (!feature_levels)
{
feature_levels = default_feature_levels;
levels = sizeof(default_feature_levels) / sizeof(default_feature_levels[0]);
levels = ARRAY_SIZE(default_feature_levels);
}
hr = D3D11CoreCreateDevice(factory, adapter, flags, feature_levels, levels, &device);
IDXGIAdapter_Release(adapter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment