[PATCH 1/5] d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalDirectionalLight().
Henri Verbeet
hverbeet at codeweavers.com
Thu May 25 15:01:35 CDT 2017
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/d3dx9_36/tests/math.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index 3843abe..b709321 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -2898,7 +2898,7 @@ static void test_D3DXSHEvalDirectionalLight(void)
dir.x = 1.1f; dir.y= 1.2f; dir.z = 2.76f;
- for (l = 0; l < sizeof( test ) / sizeof( test[0] ); l++)
+ for (l = 0; l < ARRAY_SIZE(test); ++l)
{
startindex = 0;
@@ -2908,7 +2908,7 @@ static void test_D3DXSHEvalDirectionalLight(void)
green_out = test[l].green_in;
blue_out = test[l].blue_in;
- for (j = 0; j < 49; j++)
+ for (j = 0; j < ARRAY_SIZE(rout); ++j)
{
red_out[j] = 1.01f + j;
if ( green_out )
@@ -2920,7 +2920,7 @@ static void test_D3DXSHEvalDirectionalLight(void)
hr = D3DXSHEvalDirectionalLight(order, &dir, 1.7f, 2.6f, 3.5f, red_out, green_out, blue_out);
ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr);
- for (j = 0; j < 49; j++)
+ for (j = 0; j < ARRAY_SIZE(rout); ++j)
{
if ( j >= order * order )
expected = j + test[l].roffset;
--
2.1.4
More information about the wine-patches
mailing list