This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] prevent sign extended alpha values


graydon hoare wrote:
trivial fix to make colors with alpha work. ok to commit?

-    return (getRGB() & ALPHA_MASK) >> 24;
+    return ((getRGB() & ALPHA_MASK) >> 24) & 0xff;

Why not simplify: return (getRGB() & ALPHA_MASK) >>> 24;

--
Someday, I might put a cute statement here.

Eric Blake ebb9@byu.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]