Sunday, July 31, 2011

Re: [android-developers] Resources.getColor() return type is too small

On Sun, Jul 31, 2011 at 9:45 AM, Olivier Guilyardi <> wrote:
> I know it's 32bit, but using a signed int to hold a value higher that 0x7FFFFFFF
> seems like perverting the sign bit IMO. It can lead to subtle bugs.

That ship sailed about two decades ago.

> Maybe it's a
> common case for Java programmers but it would be cleaner to use a long I think,
> since there is no unsigned integers available.

A long will perform worse than an int, except on 64-bit CPUs, none of
which power Android devices AFAIK.

Java developers have survived this long having to deal with this, and
it's not like the Internet has brok.........CARRIER LOST

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment