From 628b5aeb9e4515c0757886b161812bef0f33ad23 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Sun, 2 Nov 2008 23:56:48 +0100 Subject: [PATCH] d3dx8/tests: Fix compilation on systems that don't support nameless unions. --- dlls/d3dx8/tests/math.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/d3dx8/tests/math.c b/dlls/d3dx8/tests/math.c index f38ff261528..3dc08996d48 100644 --- a/dlls/d3dx8/tests/math.c +++ b/dlls/d3dx8/tests/math.c @@ -33,7 +33,7 @@ static inline BOOL compare_matrix(const D3DXMATRIX *m1, const D3DXMATRIX *m2) { for (j = 0; j < 4; ++j) { - if (fabs(U(m1)->m[i][j] - U(m2)->m[i][j]) > admitted_error) + if (fabs(U(*m1).m[i][j] - U(*m2).m[i][j]) > admitted_error) return FALSE; } } @@ -47,14 +47,14 @@ do { \ const D3DXMATRIX *__m2 = (gotmat); \ ok(compare_matrix(__m1, __m2), "Expected matrix=\n(%f,%f,%f,%f\n %f,%f,%f,%f\n %f,%f,%f,%f\n %f,%f,%f,%f\n)\n\n" \ "Got matrix=\n(%f,%f,%f,%f\n %f,%f,%f,%f\n %f,%f,%f,%f\n %f,%f,%f,%f)\n", \ - U(__m1)->m[0][0], U(__m1)->m[0][1], U(__m1)->m[0][2], U(__m1)->m[0][3], \ - U(__m1)->m[1][0], U(__m1)->m[1][1], U(__m1)->m[1][2], U(__m1)->m[1][3], \ - U(__m1)->m[2][0], U(__m1)->m[2][1], U(__m1)->m[2][2], U(__m1)->m[2][3], \ - U(__m1)->m[3][0], U(__m1)->m[3][1], U(__m1)->m[3][2], U(__m1)->m[3][3], \ - U(__m2)->m[0][0], U(__m2)->m[0][1], U(__m2)->m[0][2], U(__m2)->m[0][3], \ - U(__m2)->m[1][0], U(__m2)->m[1][1], U(__m2)->m[1][2], U(__m2)->m[1][3], \ - U(__m2)->m[2][0], U(__m2)->m[2][1], U(__m2)->m[2][2], U(__m2)->m[2][3], \ - U(__m2)->m[3][0], U(__m2)->m[3][1], U(__m2)->m[3][2], U(__m2)->m[3][3]); \ + U(*__m1).m[0][0], U(*__m1).m[0][1], U(*__m1).m[0][2], U(*__m1).m[0][3], \ + U(*__m1).m[1][0], U(*__m1).m[1][1], U(*__m1).m[1][2], U(*__m1).m[1][3], \ + U(*__m1).m[2][0], U(*__m1).m[2][1], U(*__m1).m[2][2], U(*__m1).m[2][3], \ + U(*__m1).m[3][0], U(*__m1).m[3][1], U(*__m1).m[3][2], U(*__m1).m[3][3], \ + U(*__m2).m[0][0], U(*__m2).m[0][1], U(*__m2).m[0][2], U(*__m2).m[0][3], \ + U(*__m2).m[1][0], U(*__m2).m[1][1], U(*__m2).m[1][2], U(*__m2).m[1][3], \ + U(*__m2).m[2][0], U(*__m2).m[2][1], U(*__m2).m[2][2], U(*__m2).m[2][3], \ + U(*__m2).m[3][0], U(*__m2).m[3][1], U(*__m2).m[3][2], U(*__m2).m[3][3]); \ } while(0) #define expect_plane(expectedplane,gotplane) ok((fabs(expectedplane.a-gotplane.a)