Michael Stefaniuc : d3d10/tests: Use the available ARRAY_SIZE() macro.

Alexandre Julliard julliard at winehq.org
Tue May 29 16:08:30 CDT 2018


Module: wine
Branch: master
Commit: e1ad81b360679313bbf635c1f148c4ffa285ea07
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e1ad81b360679313bbf635c1f148c4ffa285ea07

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue May 29 01:05:23 2018 +0200

d3d10/tests: Use the available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard 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 3e2731d..d5ba0c1 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 28ff4b7..0ca7a48 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);




More information about the wine-cvs mailing list