Quote:
Originally Posted by Crow
Hm. Why?
|
Mostly because people get confused by it. Also then you do not get tempted to write code like I do.
NPC Code:
int bytesCount = c >= 0xfc ? 5 :
c >= 0xf8 ? 4 :
c >= 0xf0 ? 3 :
c >= 0xe0 ? 2 :
c >= 0xc0 ? 1 : 0;