'int' is enough for 'length' to migrate code from x86 to x64
FrankLike via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 06:55:45 PST 2014
On Friday, 21 November 2014 at 13:59:08 UTC, ketmar via
Digitalmars-d wrote:
> any code which does something like `if (a-b < 0)` is broken. it
Modify it:
https://github.com/D-Programming-Language/druntime/blob/master/src/core/checkedint.d
Modify method: subu(uint ...) or subu(ulong ...)
if(x<y)
return y -x ;
else
return x -y;
It will be not broken.
More information about the Digitalmars-d
mailing list