wined3d: Use ARRAY_SIZE() in init_format_filter_info().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-05-29 10:53:35 +02:00 committed by Alexandre Julliard
parent 0d3dc7c971
commit cc84b252ff
1 changed files with 4 additions and 4 deletions

View File

@ -3107,9 +3107,9 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
filtered = FALSE;
}
if(filtered)
if (filtered)
{
for(i = 0; i < (sizeof(fmts16) / sizeof(*fmts16)); i++)
for (i = 0; i < ARRAY_SIZE(fmts16); ++i)
{
fmt_idx = get_format_idx(fmts16[i]);
format_set_flag(&gl_info->formats[fmt_idx], WINED3DFMT_FLAG_FILTERING);
@ -3118,14 +3118,14 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
return;
}
for(i = 0; i < (sizeof(fmts16) / sizeof(*fmts16)); i++)
for (i = 0; i < ARRAY_SIZE(fmts16); ++i)
{
fmt_idx = get_format_idx(fmts16[i]);
format = &gl_info->formats[fmt_idx];
if (!format->glInternal) continue; /* Not supported by GL */
filtered = check_filter(gl_info, gl_info->formats[fmt_idx].glInternal);
if(filtered)
if (filtered)
{
TRACE("Format %s supports filtering\n", debug_d3dformat(fmts16[i]));
format_set_flag(format, WINED3DFMT_FLAG_FILTERING);