I think a coding smell is the mix between bit and byte widths, and the use of int for client-facing code, and uint16_t for arch-specific code. I think canonicalizing all client-facing code to size_t is better, then the signedness issues go away, and then canonicalizing all input/output widths of functions/methods to be bit widths.
I think a coding smell is the mix between bit and byte widths, and the use of
int
for client-facing code, anduint16_t
for arch-specific code. I think canonicalizing all client-facing code tosize_t
is better, then the signedness issues go away, and then canonicalizing all input/output widths of functions/methods to be bit widths.