[Scummvm-devel] What should the default signing of untyped chars be?

Marcus Comstedt marcus at mc.pp.se
Thu Oct 4 23:04:11 CEST 2007


"Johannes Schickel" <lordhoto at gmail.com> writes:

> If the developers want to have a special sign they *have* to use
> signed char/unsigned char anyway since it is not defined by the C(++)
> standard what the sign of char is.

Yeah.  In fact, they (we) shouldn't use "char" at all, even with
a sign indicator, for signed/unsigned 8-bit values, but instead
the nice types int8 and uint8 (a.k.a. byte) defined in
common/scummsys.h.  "char" is for characters, which is to say text.
Any numeric value should use int8/uint8/byte.


  // Marcus






More information about the Scummvm-devel mailing list