Skip to content

Commit

Permalink
[Ref] IT Compression: Make clang static analyzer happy.
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22447 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Dec 2, 2024
1 parent 6916570 commit 18e81ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion soundlib/ITCompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ void ITCompression::CompressBlock(const typename Properties::sample_t *data, Smp
{
if(bwt[i] != width)
{
MPT_ASSERT(width >= 0);
if(width <= 6)
{
// Mode A: 1 to 6 bits
MPT_ASSERT(width);
MPT_ASSERT(width != 0);
WriteBits(width, (1 << (width - 1)));
WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i]));
} else if(width < Properties::defWidth)
Expand Down

0 comments on commit 18e81ba

Please sign in to comment.