d3dx9_36: simplify code
David Adam
david.adam.cnrs at gmail.com
Wed Jun 24 21:14:32 CDT 2015
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150624/77b4260a/attachment.html>
-------------- next part --------------
From 6f8e199305833f4993a4ff573eb379b72bf4ae9d Mon Sep 17 00:00:00 2001
From: David Adam <david.adam.cnrs at gmail.com>
Date: Wed, 24 Jun 2015 16:12:23 -1000
Subject: d3dx_36: Simplify code
---
dlls/d3dx9_36/mesh.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 5be54d2..81dcf6b 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -7198,7 +7198,7 @@ HRESULT WINAPI D3DXOptimizeFaces(const void *indices, UINT num_faces,
UINT i;
UINT j = num_faces - 1;
UINT limit_16_bit = 2 << 15; /* According to MSDN */
- HRESULT hr = D3D_OK;
+ HRESULT hr;
FIXME("indices %p, num_faces %u, num_vertices %u, indices_are_32bit %#x, face_remap %p semi-stub. "
"Face order will not be optimal.\n",
@@ -7208,15 +7208,13 @@ HRESULT WINAPI D3DXOptimizeFaces(const void *indices, UINT num_faces,
{
WARN("Number of faces must be less than %d when using 16-bit indices.\n",
limit_16_bit);
- hr = D3DERR_INVALIDCALL;
- goto error;
+ return D3DERR_INVALIDCALL;
}
if (!face_remap)
{
WARN("Face remap pointer is NULL.\n");
- hr = D3DERR_INVALIDCALL;
- goto error;
+ return D3DERR_INVALIDCALL;
}
/* The faces are drawn in reverse order for simple meshes. This ordering
@@ -7232,7 +7230,4 @@ HRESULT WINAPI D3DXOptimizeFaces(const void *indices, UINT num_faces,
}
return D3D_OK;
-
-error:
- return hr;
}
--
2.1.4
More information about the wine-patches
mailing list