Usual Arithmetic Conversions
In here (msdn) I've read about uac and everything is well and fine but last rule is bit disturbing. If I have two operands of type unsigned short
will they b开发者_如何学Pythone converted to int
not to unsiged int
?
Thins might have something to do with chains of conversions. Although you don't need the int to be signed, it isn't harmful to use a signed int, either. SO in principle, both options should work.
By using the "normal" / signed int, you end up with a less restrictive case for further conversion.
精彩评论