X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=dll%2Fdirectx%2Fwine%2Fd3dcompiler_43%2Futils.c;h=748501f2074b00f9d485d0267ea70bb67ec5e8cf;hp=9d32677a8190b84744b47408862b2c864e8bf602;hb=c003509323faee50695d761420a36a6d0d198d7d;hpb=d02c72252cfdb712d3efd2d54ae3877488010a96 diff --git a/dll/directx/wine/d3dcompiler_43/utils.c b/dll/directx/wine/d3dcompiler_43/utils.c index 9d32677a819..748501f2074 100644 --- a/dll/directx/wine/d3dcompiler_43/utils.c +++ b/dll/directx/wine/d3dcompiler_43/utils.c @@ -557,7 +557,7 @@ HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD d return S_OK; } -HRESULT dxbc_init(struct dxbc *dxbc, DWORD size) +HRESULT dxbc_init(struct dxbc *dxbc, UINT size) { TRACE("dxbc %p, size %u.\n", dxbc, size); @@ -1154,7 +1154,7 @@ static BOOL expr_compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t 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, @@ -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]; }