diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-17 02:05:42 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-17 02:05:42 +0000 |
commit | c915f1bcd46144578fad464e52b5a6013dc98de8 (patch) | |
tree | 4ad01cd4d1e4340fc2d46586a5ffa5c3ab642ccd /assetFactory/texturePacker.h | |
parent | Allow overriding vectorOfN's returned type (diff) | |
download | ilt-c915f1bcd46144578fad464e52b5a6013dc98de8.tar.bz2 ilt-c915f1bcd46144578fad464e52b5a6013dc98de8.tar.xz ilt-c915f1bcd46144578fad464e52b5a6013dc98de8.zip |
Fix texture packer return value so positions match inputs
Diffstat (limited to 'assetFactory/texturePacker.h')
-rw-r--r-- | assetFactory/texturePacker.h | 5 |
1 files changed, 3 insertions, 2 deletions
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<Position>; using Result = std::pair<Positions, Size>; - TexturePacker(std::vector<Image>); + TexturePacker(std::span<const Image>); Result pack(Size) const; Result pack() const; @@ -32,5 +32,6 @@ public: static decltype(Size::x) area(const Size & size); private: - std::vector<Image> inputImages; + std::span<const Image> inputImages; + std::vector<size_t> sortedIndexes; }; |