From c915f1bcd46144578fad464e52b5a6013dc98de8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 17 Mar 2023 02:05:42 +0000 Subject: Fix texture packer return value so positions match inputs --- assetFactory/texturePacker.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'assetFactory/texturePacker.h') diff --git a/assetFactory/texturePacker.h b/assetFactory/texturePacker.h index 8e2061b..7e00f1a 100644 --- a/assetFactory/texturePacker.h +++ b/assetFactory/texturePacker.h @@ -23,7 +23,7 @@ public: using Positions = std::vector; using Result = std::pair; - TexturePacker(std::vector); + TexturePacker(std::span); Result pack(Size) const; Result pack() const; @@ -32,5 +32,6 @@ public: static decltype(Size::x) area(const Size & size); private: - std::vector inputImages; + std::span inputImages; + std::vector sortedIndexes; }; -- cgit v1.2.3