[flac-dev] PATCH: bugfixes for bitmath.h

lvqcl lvqcl.mail at gmail.com
Sun Sep 15 15:44:51 PDT 2013


Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:

>> 3. FLAC__bitmath_ilog2_wide() cannot be compiled with MSVC: it has
>> 'if (v == 0)...' statement followed by a variable (either idx or
>> DEBRUIJN_IDX64) definition. But all calls of this function have
>> FLAC__ASSERT statements that ensure that its argument is greater
>> than 0. So this 'if()' can be removed.
>
> I'd actuall prefer to remove those ASSERTS, because they get bypassed
> for the production compiles anyway.

I thought that these ASSERTs mean that the encoding algorithm ensures:
the argument of FLAC__bitmath_ilog2_wide() is always > 0.
In this case there's no need to compare it with 0 inside the function.


More information about the flac-dev mailing list