Skip to content

Commit

Permalink
KtxImageConverter: turn these into internal assertions.
Browse files Browse the repository at this point in the history
As those are impossible to hit, and thus impossible to test, it doesn't
really make sense to have them carry a message.
  • Loading branch information
mosra committed Jan 27, 2025
1 parent d6db322 commit e5e9748
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MagnumPlugins/KtxImageConverter/KtxImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ Containers::Pair<Implementation::KdfBasicBlockHeader::ColorModel, Containers::Ar
return {Implementation::KdfBasicBlockHeader::ColorModel::Pvrtc, SamplesPvrtc};
}

CORRADE_ASSERT_UNREACHABLE("samples(): unsupported format" << format, {}); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}

UnsignedByte channelFormat(Implementation::VkFormatSuffix suffix) {
Expand All @@ -462,7 +462,7 @@ UnsignedByte channelFormat(Implementation::VkFormatSuffix suffix) {
return {};
}

CORRADE_ASSERT_UNREACHABLE("channelFormat(): invalid format suffix" << UnsignedInt(suffix), {}); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}

Containers::Pair<UnsignedInt, UnsignedInt> channelMapping(Implementation::VkFormatSuffix suffix, UnsignedInt bitLength, bool isCompressed) {
Expand Down Expand Up @@ -502,7 +502,7 @@ Containers::Pair<UnsignedInt, UnsignedInt> channelMapping(Implementation::VkForm
return {Utility::bitCast<UnsignedInt>(-1.0f), Utility::bitCast<UnsignedInt>(1.0f)};
}

CORRADE_ASSERT_UNREACHABLE("channelMapping(): invalid format suffix" << UnsignedInt(suffix), {}); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}

template<typename Format> Containers::Array<char> fillDataFormatDescriptor(Format format, Implementation::VkFormatSuffix suffix) {
Expand Down

0 comments on commit e5e9748

Please sign in to comment.