mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-05 23:00:03 -04:00
mem_malloc type triviality checks (4/8)
```
git grep -l mem_malloc | xargs perl -i -lpe 's{\((\w+) \*\)mem_malloc\((\S+) \* sizeof\(\1\)\)}{mem_rmalloc<$1 *>($2)}'
```
This commit is contained in:
@@ -314,7 +314,7 @@ int ComputeSurfacesForObjects(int surface_index, int terrain) {
|
||||
ComputeObjectSurfaceRes(&Light_surfaces[surface_index], &Objects[i], t, j);
|
||||
|
||||
if (sm->faces[j].nverts > 0) {
|
||||
Light_surfaces[surface_index].verts = (vector *)mem_malloc(sm->faces[j].nverts * sizeof(vector));
|
||||
Light_surfaces[surface_index].verts = mem_rmalloc<vector>(sm->faces[j].nverts);
|
||||
ASSERT(Light_surfaces[surface_index].verts != NULL);
|
||||
} else
|
||||
Light_surfaces[surface_index].verts = NULL;
|
||||
@@ -400,7 +400,7 @@ int ComputeSurfacesForObjectsForSingleRoom(int surface_index, int roomnum) {
|
||||
ComputeObjectSurfaceRes(&Light_surfaces[surface_index], &Objects[i], t, j);
|
||||
|
||||
if (sm->faces[j].nverts > 0) {
|
||||
Light_surfaces[surface_index].verts = (vector *)mem_malloc(sm->faces[j].nverts * sizeof(vector));
|
||||
Light_surfaces[surface_index].verts = mem_rmalloc<vector>(sm->faces[j].nverts);
|
||||
ASSERT(Light_surfaces[surface_index].verts != NULL);
|
||||
} else
|
||||
Light_surfaces[surface_index].verts = NULL;
|
||||
|
||||
Reference in New Issue
Block a user