[phobos] phobos commit, revision 2305
Walter Bright
walter at digitalmars.com
Tue Jan 11 01:25:54 PST 2011
I think it would be more efficient to write it as:
static if (s1.length.sizeof == int.sizeof)
return s1.length - s2.length;
else
return s1.length > s2.length ? 1 : s1.length < s2.length ? -1 : 0;
dsource.org wrote:
> phobos commit, revision 2305
>
>
> user: andrei
>
> msg:
> Reverted cmp and icmp to return int, take 2
>
> http://www.dsource.org/projects/phobos/changeset/2305
>
> paths changed:
> U trunk/phobos/std/string.d
>
>
>
More information about the phobos
mailing list