Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Dec 8, 2024
1 parent 0d1c78e commit b713092
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/image_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
{
Expand All @@ -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)
{
Expand Down

0 comments on commit b713092

Please sign in to comment.