1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Replace some raw pointers by unique_ptr (#16304)

This commit is contained in:
Lucas OH 2025-08-06 23:17:34 +02:00 committed by GitHub
parent c611a1f9e8
commit ecc876045f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 56 additions and 48 deletions

View file

@ -11,10 +11,10 @@ void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertice
u32 numVertices, const u16 *indices, u32 numIndices)
{
for (int layernum = 0; layernum < MAX_TILE_LAYERS; layernum++) {
const TileLayer *layer = &tile.layers[layernum];
if (layer->empty())
const TileLayer &layer = tile.layers[layernum];
if (layer.empty())
continue;
append(*layer, vertices, numVertices, indices, numIndices, layernum);
append(layer, vertices, numVertices, indices, numIndices, layernum);
}
}