Commit c91a00ce authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dcompiler: Use the ARRAY_SIZE() macro.

parent 95bdd7f8
......@@ -570,7 +570,7 @@ static const struct target_info targets_info[] = {
static const struct target_info * get_target_info(const char *target)
{
LONG min = 0;
LONG max = sizeof(targets_info) / sizeof(targets_info[0]) - 1;
LONG max = ARRAY_SIZE(targets_info) - 1;
LONG cur;
int res;
......
......@@ -1165,7 +1165,7 @@ static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hl
};
int t1_idx = -1, t2_idx = -1, i;
for (i = 0; i < sizeof(types) / sizeof(types[0]); ++i)
for (i = 0; i < ARRAY_SIZE(types); ++i)
{
/* Always convert away from HLSL_TYPE_HALF */
if (t1 == types[i])
......@@ -1943,7 +1943,7 @@ static const char *debug_node_type(enum hlsl_ir_node_type type)
"HLSL_IR_SWIZZLE",
};
if (type >= sizeof(names) / sizeof(names[0]))
if (type >= ARRAY_SIZE(names))
return "Unexpected node type";
return names[type];
}
......
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