[PATCH 4/5] d3dx9_36: Use SIZE_T for some iterators.

Stefan Dösinger stefan at codeweavers.com
Wed Jan 1 12:01:44 CST 2014


This fixes a signed / unsigned comparison warning in msvc.

The element counter is a SIZE_T, and the only method to which the
iterator is passed (ID3DXFileData::GetChild) accepts a SIZE_T, so it only
makes sense to make the iterator a SIZE_T as well.
---
 dlls/d3dx9_36/mesh.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index bbe1eb1..90f004b 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -2687,7 +2687,7 @@ static HRESULT parse_material(ID3DXFileData *filedata, D3DXMATERIAL *material)
     GUID type;
     ID3DXFileData *child;
     SIZE_T nb_children;
-    int i;
+    SIZE_T i;
 
     material->pTextureFilename = NULL;
 
@@ -3828,7 +3828,7 @@ static HRESULT load_frame(struct ID3DXFileData *filedata, DWORD options, struct
     D3DXMESHCONTAINER **next_container;
     D3DXFRAME **next_child;
     SIZE_T nb_children;
-    int i;
+    SIZE_T i;
 
     hr = filedata_get_name(filedata, &name);
     if (FAILED(hr)) return hr;
@@ -3887,7 +3887,7 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memo
     D3DXFRAME **next_frame = &first_frame;
     SIZE_T nb_children;
     GUID guid;
-    int i;
+    SIZE_T i;
 
     TRACE("(%p, %u, %x, %p, %p, %p, %p, %p)\n", memory, memory_size, options,
           device, alloc_hier, load_user_data, frame_hierarchy, anim_controller);
@@ -4125,7 +4125,7 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct
     ID3DXFileData *child;
     GUID type;
     SIZE_T nb_children;
-    int i;
+    SIZE_T i;
 
     hr = filedata->lpVtbl->GetChildren(filedata, &nb_children);
     if (FAILED(hr))
@@ -4192,7 +4192,7 @@ HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size,
     DWORD concat_vertex_size;
     SIZE_T nb_children;
     GUID guid;
-    int i;
+    SIZE_T i;
 
     TRACE("(%p, %u, %x, %p, %p, %p, %p, %p, %p)\n", memory, memory_size, options,
           device, adjacency_out, materials_out, effects_out, num_materials_out, mesh_out);
-- 
1.8.3.2




More information about the wine-patches mailing list