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:
Jan Engelhardt
2024-08-30 20:52:36 +02:00
parent bb38a4a565
commit 4d2fdb2316
22 changed files with 65 additions and 65 deletions

View File

@@ -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;