Skip to content

Clang-format issue with ( const int16_t )

The clang-format rules seem to be inconsistent when formatting data types cast.

E.g. there are in the main d9695bf5 different formatting wrt. spaces of ( const int16_t ):

lsf_enc.c, line 1023:
    set_s( idx_buf, 0, ( const int16_t )( 2 * stagesVQ * maxC ) );

vs

tools.c, line 1316:
    m = mean( x, (const int16_t) len );

Moreover, the scripts/clang-format seems to behave differently from the (in my case MSVC) build-in one.

Does anybody have an idea why there is this different formatting syntax and which one is actually expected?

Edited by vaclav