#889

duplicated sizeof checks in src/nuklear_internal.h

OpensleeptightAnsiCopened 8mo ago

Follow up from https://github.com/Immediate-Mode-UI/Nuklear/pull/884#discussion_r2750159640

https://github.com/Immediate-Mode-UI/Nuklear/blob/25f33c8780a8b41668447f83e7d154e735cf424f/src/nuklear_internal.h#L61-L79

I wonder why do we need these duplicated checks here? The ones from src/nuklear.h do the very same thing, and all src/*.c files are including both of those headers, so I'm not sure what is the benefit?

This thing can only really harm us, just like in case of #185 where the sizeof(nk_bool) == ... checks were different between each file, and went unnoticed for so long.

In theory having some duplication in src/nuklear.h may make sense, but in practice those checks just do nothing. The proper sizes are already ensured at the moment when any of those is hit. This just looks like a dead code to me at this point.

I'm planning to remove this unless someone has a good reason to keep it (?)

Activity

0

No activity yet.