diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-16 12:27:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-16 12:27:46 +0200 |
commit | 47b9691f9bde62ea62f6601503997d93ed7ab64c (patch) | |
tree | f0e08b4f37ced066ac18defdf233eec0e91b6cc0 /src/ground-atlas.cpp | |
parent | 6aabc74a535da1f2d5cf866346b31939d097cbac (diff) |
wa
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; |