From 5deab783e2a18fa2819d99e7ba3b197a189bb3b4 Mon Sep 17 00:00:00 2001 From: Daniel Scharrer Date: Thu, 2 Jun 2011 19:27:44 +0200 Subject: [PATCH] include: Fix compile error in d3dtypes.h for c++ programs that define D3D_OVERLOADS. --- include/d3dtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/d3dtypes.h b/include/d3dtypes.h index 21b9e74d709..ab06b5ecb90 100644 --- a/include/d3dtypes.h +++ b/include/d3dtypes.h @@ -336,9 +336,9 @@ typedef struct _D3DMATRIX { /* This is different from MS, but avoids anonymous structs. */ D3DVALUE &operator () (int r, int c) - { return ((D3DVALUE [4][4])&_11)[r][c]; } + { return (&_11)[r*4 + c]; } const D3DVALUE &operator() (int r, int c) const - { return ((const D3DVALUE [4][4])&_11)[r][c]; } + { return (&_11)[r*4 + c]; } #endif } D3DMATRIX, *LPD3DMATRIX;