summaryrefslogtreecommitdiff
path: root/test/test-assetFactory.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
commitd6e99a696aa582b81018078b68f6600c8030d643 (patch)
tree5c1451bbc76c31f78ddd169fca7780a0943f5910 /test/test-assetFactory.cpp
parentReformat with new clang-format (diff)
downloadilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.bz2
ilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.xz
ilt-d6e99a696aa582b81018078b68f6600c8030d643.zip
WIP typedefing all the things - headers
Diffstat (limited to 'test/test-assetFactory.cpp')
-rw-r--r--test/test-assetFactory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp
index 145481e..177ab6a 100644
--- a/test/test-assetFactory.cpp
+++ b/test/test-assetFactory.cpp
@@ -183,14 +183,15 @@ BOOST_AUTO_TEST_CASE(texturePacker_many, *boost::unit_test::timeout(5))
{
std::vector<TexturePacker::Image> images(256);
std::fill(images.begin(), images.end(), TexturePacker::Image {32, 32});
- const auto totalSize = std::accumulate(images.begin(), images.end(), 0U, [](auto t, const auto & i) {
+ const auto totalSize = std::accumulate(images.begin(), images.end(), 0, [](auto t, const auto & i) {
return t + TexturePacker::area(i);
});
TexturePacker tp {images};
BOOST_CHECK_EQUAL(TexturePacker::Size(32, 32), tp.minSize());
const auto result = tp.pack();
BOOST_CHECK_EQUAL(result.first.size(), images.size());
- BOOST_CHECK_GE(TexturePacker::area(result.second), TexturePacker::area(images.front()) * images.size());
+ BOOST_CHECK_GE(TexturePacker::area(result.second),
+ TexturePacker::area(images.front()) * static_cast<GLsizei>(images.size()));
BOOST_CHECK_EQUAL(totalSize, TexturePacker::area(result.second));
}