return S_OK;
}
-HRESULT dxbc_init(struct dxbc *dxbc, UINT size)
+HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size)
{
TRACE("dxbc %p, size %u.\n", dxbc, size);
static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hlsl_base_type t2)
{
- enum hlsl_base_type types[] =
+ static const enum hlsl_base_type types[] =
{
HLSL_TYPE_BOOL,
HLSL_TYPE_INT,
};
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])
"HLSL_IR_SWIZZLE",
};
- if (type >= sizeof(names) / sizeof(names[0]))
+ if (type >= ARRAY_SIZE(names))
return "Unexpected node type";
return names[type];
}