From b7130927db997b6c25effe77d46e338084ba653d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sat, 7 Dec 2024 22:49:58 -0800 Subject: [PATCH] Cleanup. --- src/image.cpp | 8 ++++---- src/image_encode.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/image.cpp b/src/image.cpp index 7afe925..6fd87ee 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -122,7 +122,7 @@ namespace bimg { 32, 1, 1, 4, 1, 1, 32, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Float) }, // D32F { 8, 1, 1, 1, 1, 1, 0, 8, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // D0S8 }; - BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_imageBlockInfo) ); + static_assert(TextureFormat::Count == BX_COUNTOF(s_imageBlockInfo) ); static const char* s_textureFormatName[] = { @@ -223,7 +223,7 @@ namespace bimg "D32F", // D32F "D0S8", // D0S8 }; - BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormatName) ); + static_assert(TextureFormat::Count == BX_COUNTOF(s_textureFormatName) ); bool isCompressed(TextureFormat::Enum _format) { @@ -1156,7 +1156,7 @@ namespace bimg { bx::packR32F, bx::unpackR32F }, // D32F { bx::packR8, bx::unpackR8 }, // D0S8 }; - BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_packUnpack) ); + static_assert(TextureFormat::Count == BX_COUNTOF(s_packUnpack) ); PackFn getPack(TextureFormat::Enum _format) { @@ -4124,7 +4124,7 @@ namespace bimg { KTX_RGB10_A2, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_INT_2_10_10_10_REV, }, // RGB10A2 { KTX_R11F_G11F_B10F, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_10F_11F_11F_REV, }, // RG11B10F }; - BX_STATIC_ASSERT(TextureFormat::UnknownDepth == BX_COUNTOF(s_translateKtxFormat) ); + static_assert(TextureFormat::UnknownDepth == BX_COUNTOF(s_translateKtxFormat) ); struct KtxFormatInfo2 { diff --git a/src/image_encode.cpp b/src/image_encode.cpp index 066156a..6b44a77 100644 --- a/src/image_encode.cpp +++ b/src/image_encode.cpp @@ -39,7 +39,7 @@ namespace bimg squish::kColourIterativeClusterFit, // Highest squish::kColourRangeFit, // Fastest }; - BX_STATIC_ASSERT(Quality::Count == BX_COUNTOF(s_squishQuality) ); + static_assert(Quality::Count == BX_COUNTOF(s_squishQuality) ); static const float s_astcQuality[] = { @@ -52,7 +52,7 @@ namespace bimg ASTCENC_PRE_THOROUGH, // Highest ASTCENC_PRE_FAST, // Fastest }; - BX_STATIC_ASSERT(Quality::Count == BX_COUNTOF(s_astcQuality) ); + static_assert(Quality::Count == BX_COUNTOF(s_astcQuality) ); void imageEncodeFromRgba8(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, Quality::Enum _quality, bx::Error* _err) {