1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 17:08:00 +02:00

Remove unnecessary offset variable in Float.Parse

This commit is contained in:
disarray2077 2022-02-15 14:30:11 -03:00 committed by GitHub
parent d0673115d0
commit 9779e284fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,12 +176,12 @@ namespace System
bool isNeg = val[0] == '-'; bool isNeg = val[0] == '-';
bool isPos = val[0] == '+'; bool isPos = val[0] == '+';
int32 offset = isNeg || isPos ? 1 : 0;
double result = 0; double result = 0;
double decimalMultiplier = 0; double decimalMultiplier = 0;
var val; var val;
val.RemoveFromStart(offset); if (isNeg || isPos)
val.RemoveFromStart(1);
if (@val.Equals(info.NegativeInfinitySymbol, true)) if (@val.Equals(info.NegativeInfinitySymbol, true))
return NegativeInfinity; return NegativeInfinity;