diff options
Diffstat (limited to 'src/ground-atlas.cpp')
-rw-r--r-- | src/ground-atlas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ground-atlas.cpp b/src/ground-atlas.cpp index 726ec557..f78d53be 100644 --- a/src/ground-atlas.cpp +++ b/src/ground-atlas.cpp @@ -47,10 +47,10 @@ auto ground_atlas::make_texcoords(Vector2ui pixel_size, Vector2ub tile_count, si return texcoords_at(p0, sz, pixel_size); } -auto ground_atlas::make_texcoords_array(Vector2ui pixel_size, Vector2ub tile_count) -> std::unique_ptr<const texcoords[]> +auto ground_atlas::make_texcoords_array(Vector2ui pixel_size, Vector2ub tile_count) -> Array<texcoords> { const size_t N = Vector2ui{tile_count}.product(); - auto ptr = std::make_unique<std::array<Vector2, 4>[]>(N); + auto ptr = Array<texcoords>{NoInit, N}; for (auto i = 0uz; i < N; i++) ptr[i] = make_texcoords(pixel_size, tile_count, i); return ptr; |