From 4d9a82b720c8ce74b94f43f72ddd819ef21abbdf Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 18 Mar 2023 23:42:07 +0100 Subject: pre-declare integer types without cstddef/cstdint --- test/bitmask.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/bitmask.cpp') diff --git a/test/bitmask.cpp b/test/bitmask.cpp index 5398bce7..1b3deea9 100644 --- a/test/bitmask.cpp +++ b/test/bitmask.cpp @@ -16,7 +16,7 @@ namespace floormat { namespace { -constexpr std::size_t data_nbytes = 128; +constexpr size_t data_nbytes = 128; const unsigned char data_door_close[] = { #include "bitmask.embed.inc" }; @@ -45,7 +45,7 @@ void bitmask_test() { auto img = loader.texture(loader.SCENERY_PATH, "door-close"_s); auto bitmask = anim_atlas::make_bitmask(img); - fm_assert(img.pixelSize() == 4 && (std::size_t)img.size().product() >= data_nbytes); + fm_assert(img.pixelSize() == 4 && (size_t)img.size().product() >= data_nbytes); #ifdef DO_GENERATE for (auto i = 0_uz; i < data_nbytes; i++) { @@ -58,7 +58,7 @@ void bitmask_test() printf("\n"); fflush(stdout); #endif - const auto len = std::min(data_nbytes, (std::size_t)bitmask.size()+7 >> 3); + const auto len = std::min(data_nbytes, (size_t)bitmask.size()+7 >> 3); for (auto i = 0_uz; i < len; i++) if ((unsigned char)bitmask.data()[i] != data_door_close[i]) fm_abort("wrong value at bit %zu, should be' 0x%02hhx'", i, data_door_close[i]); -- cgit v1.2.3