Module: wine Branch: master Commit: 24f522c520877218af2987720b7832b8b4f00867 URL: http://source.winehq.org/git/wine.git/?a=commit;h=24f522c520877218af2987720b...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Aug 3 10:13:30 2010 +0200
d3dx9_36/tests: Avoid the non-portable NAN macro.
---
dlls/d3dx9_36/tests/mesh.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index bffcb2b..87003d1 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -68,16 +68,14 @@ static void free_mesh(struct mesh *mesh)
static BOOL new_mesh(struct mesh *mesh, DWORD number_of_vertices, DWORD number_of_faces) { - int i; - - mesh->vertices = HeapAlloc(GetProcessHeap(), 0, number_of_vertices * sizeof(*mesh->vertices)); + mesh->vertices = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, number_of_vertices * sizeof(*mesh->vertices)); if (!mesh->vertices) { return FALSE; } mesh->number_of_vertices = number_of_vertices;
- mesh->faces = HeapAlloc(GetProcessHeap(), 0, number_of_faces * sizeof(*mesh->faces)); + mesh->faces = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, number_of_faces * sizeof(*mesh->faces)); if (!mesh->faces) { HeapFree(GetProcessHeap(), 0, mesh->vertices); @@ -85,17 +83,6 @@ static BOOL new_mesh(struct mesh *mesh, DWORD number_of_vertices, DWORD number_o } mesh->number_of_faces = number_of_faces;
- /* fill with nonsense data to make sure no comparison succeed by chance */ - for (i = 0; i < number_of_vertices; i++) - { - mesh->vertices[i].position.x = NAN; mesh->vertices[i].position.y = NAN; mesh->vertices[i].position.z = NAN; - mesh->vertices[i].normal.x = NAN; mesh->vertices[i].normal.y = NAN; mesh->vertices[i].normal.z = NAN; - } - for (i = 0; i < number_of_faces; i++) - { - mesh->faces[i][0] = -1; mesh->faces[i][1] = -1; mesh->faces[i][2] = -1; - } - return TRUE; }