[PATCH 5/6] wined3d: Use ARRAY_SIZE() in init_format_filter_info().
Józef Kucia
jkucia at codeweavers.com
Mon May 29 03:53:35 CDT 2017
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/utils.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 37f9d27..b7d894c 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3109,9 +3109,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);
@@ -3120,14 +3120,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);
--
2.10.2
More information about the wine-patches
mailing list