On Thu, 28 May 2020 19:33:12 +0200 Laslo Hunhold <[email protected]> wrote:
> On Thu, 28 May 2020 16:49:22 +0200 > Mattias Andrée <[email protected]> wrote: > > Dear Mattias, > > > > > So would you recommend an explicit cast to uint32_t, i.e. > > > > > > > > (uint32_t)1 << 16 > > > > > > > > to overcome this? > > > > > > Yes. > > > > Don't forget about 0x10FFFF, where you need UINT32_C(0x10FFFF). > > Casting doesn't work here unless you also add the L suffix. > > thanks for your input on this. I've fixed these problems and also > simplified the mask-operation as you've suggested. > > With best regards > > Laslo > Looks good. But I wouldn't call the mask operation change and optimisation (even though it is), than I would have suggested `*cp = s[0] ^ lut[off].lower`. :)
