From 5accb12c1298a81a59e7d19080543ebf75635aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Wed, 26 Sep 2012 13:57:21 +0200 Subject: [PATCH] d3dx9: Avoid variable assignment in D3DXQuaternionNormalize(). --- dlls/d3dx9_36/math.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index c6fa19a5d64..9be3011a8f7 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -1338,23 +1338,20 @@ D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQU return pout; } -D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) +D3DXQUATERNION * WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *out, const D3DXQUATERNION *q) { - D3DXQUATERNION out; FLOAT norm; - TRACE("(%p, %p)\n", pout, pq); + TRACE("out %p, q %p\n", out, q); - norm = D3DXQuaternionLength(pq); + norm = D3DXQuaternionLength(q); - out.x = pq->x / norm; - out.y = pq->y / norm; - out.z = pq->z / norm; - out.w = pq->w / norm; + out->x = q->x / norm; + out->y = q->y / norm; + out->z = q->z / norm; + out->w = q->w / norm; - *pout=out; - - return pout; + return out; } D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle)