Skip to content

Commit

Permalink
don't bother with signed types
Browse files Browse the repository at this point in the history
Everything is >= 0 all the time anyway.
  • Loading branch information
Nils Boßung committed Jul 24, 2014
1 parent efe0d17 commit 2606fd5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions std/conv.d
Expand Up @@ -2190,10 +2190,7 @@ body
}

bool overflow = false;
static if (isSigned!Target)
auto nextv = v.muls(radix, overflow).adds(c - '0', overflow);
else
auto nextv = v.mulu(radix, overflow).addu(c - '0', overflow);
auto nextv = v.mulu(radix, overflow).addu(c - '0', overflow);
if (overflow || nextv > Target.max)
goto Loverflow;
v = cast(Target) nextv;
Expand Down

0 comments on commit 2606fd5

Please sign in to comment.