On Tue, 22 Nov 2022 22:23:52 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> I would just revert it back.
>
> (long) width * height * 4;
> is dangerous if one does not remember the precedence rules - is typecast 
> applied to width or the end result?
> 4L * w * h; is unambiguous.

I'm not sure I like either of the two choices you listed. By "revert it back" I 
mean leave the code alone. The existing code, with its explicit casts, leaves 
no room for doubt:


return ((long) width) * ((long) height) * 4L;

-------------

PR: https://git.openjdk.org/jfx/pull/960

Reply via email to