[PATCH] d3d10/tests: Use the available ARRAY_SIZE() macro
Michael Stefaniuc
mstefani at winehq.org
Mon May 28 18:05:23 CDT 2018
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/d3d10/tests/device.c | 2 +-
dlls/d3d10/tests/effect.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d10/tests/device.c b/dlls/d3d10/tests/device.c
index 3e2731d895..d5ba0c1818 100644
--- a/dlls/d3d10/tests/device.c
+++ b/dlls/d3d10/tests/device.c
@@ -154,7 +154,7 @@ static void test_stateblock_mask(void)
ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
hr = D3D10StateBlockMaskEnableCapture(NULL, D3D10_DST_VS, 0, 1);
ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
- for (i = 0; i < sizeof(capture_test) / sizeof(*capture_test); ++i)
+ for (i = 0; i < ARRAY_SIZE(capture_test); ++i)
{
memset(&result, 0xff, sizeof(result));
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS_SHADER_RESOURCES,
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c
index 28ff4b7387..0ca7a48c3f 100644
--- a/dlls/d3d10/tests/effect.c
+++ b/dlls/d3d10/tests/effect.c
@@ -2425,7 +2425,7 @@ static void test_effect_constant_buffer_stride(void)
hr = create_effect(fx_test_ecbs, 0, device, NULL, &effect);
ok(SUCCEEDED(hr), "D3D10CreateEffectFromMemory failed (%x)\n", hr);
- for (i=0; i<sizeof(tv_ecbs)/sizeof(tv_ecbs[0]); i++)
+ for (i=0; i<ARRAY_SIZE(tv_ecbs); i++)
{
constantbuffer = effect->lpVtbl->GetConstantBufferByIndex(effect, i);
type = constantbuffer->lpVtbl->GetType(constantbuffer);
--
2.14.3
More information about the wine-devel
mailing list