From 200e9a209f6eb1ac76a7d0a5f6813ec380cf57b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 24 Sep 2023 00:29:49 +0200 Subject: [PATCH] TextureTools: pass StridedArrayView via const&. It's bigger than two pointers. --- src/Magnum/TextureTools/Atlas.cpp | 2 +- src/Magnum/TextureTools/Atlas.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/TextureTools/Atlas.cpp b/src/Magnum/TextureTools/Atlas.cpp index 879c6748c..6ae97c1fb 100644 --- a/src/Magnum/TextureTools/Atlas.cpp +++ b/src/Magnum/TextureTools/Atlas.cpp @@ -65,7 +65,7 @@ std::vector atlas(const Vector2i& atlasSize, const std::vector> atlasArrayPowerOfTwo(const Vector2i& layerSize, const Containers::StridedArrayView1D sizes) { +Containers::Pair> atlasArrayPowerOfTwo(const Vector2i& layerSize, const Containers::StridedArrayView1D& sizes) { CORRADE_ASSERT(layerSize.product() && layerSize.x() == layerSize.y() && (layerSize & (layerSize - Vector2i{1})).isZero(), "TextureTools::atlasArrayPowerOfTwo(): expected layer size to be a non-zero power-of-two square, got" << Debug::packed << layerSize, {}); diff --git a/src/Magnum/TextureTools/Atlas.h b/src/Magnum/TextureTools/Atlas.h index fd277df2d..1b280b246 100644 --- a/src/Magnum/TextureTools/Atlas.h +++ b/src/Magnum/TextureTools/Atlas.h @@ -72,7 +72,7 @@ atlasing in a single @f$ \mathcal{O}(n) @f$ operation. Due to the sort involved, a temporary allocation holds the sorted array and additionally @ref std::stable_sort() performs its own allocation. */ -Containers::Pair> MAGNUM_TEXTURETOOLS_EXPORT atlasArrayPowerOfTwo(const Vector2i& layerSize, Containers::StridedArrayView1D sizes); +Containers::Pair> MAGNUM_TEXTURETOOLS_EXPORT atlasArrayPowerOfTwo(const Vector2i& layerSize, const Containers::StridedArrayView1D& sizes); /** * @overload