Fix CA1305

This commit is contained in:
RoosterDragon
2023-03-12 15:08:23 +00:00
committed by Matthias Mailänder
parent 486a07602b
commit d83e579dfe
71 changed files with 287 additions and 219 deletions

View File

@@ -354,7 +354,7 @@ namespace OpenRA.Support
if (cc != CharClass.Digit)
{
if (cc != CharClass.Whitespace && cc != CharClass.Operator && cc != CharClass.Mixed)
throw new InvalidDataException($"Number {int.Parse(expression[start..i])} and variable merged at index {start}");
throw new InvalidDataException($"Number {Exts.ParseInt32Invariant(expression[start..i])} and variable merged at index {start}");
return true;
}
@@ -571,7 +571,7 @@ namespace OpenRA.Support
public NumberToken(int index, string symbol)
: base(TokenType.Number, index)
{
Value = int.Parse(symbol);
Value = Exts.ParseInt32Invariant(symbol);
this.symbol = symbol;
}
}