Refactor: Remove redundant boxing/unboxing to parse int primitives (#9065)

This commit is contained in:
DeepCrimson 2022-06-12 09:46:59 -07:00 committed by GitHub
parent 95ede50523
commit 3ae5f4979d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 19 additions and 19 deletions

View file

@ -459,7 +459,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
}
if (symbol.length() == 1 || isNumeric(symbol)) {
if (Character.isDigit(symbol.charAt(0))) {
this.add(new GenericManaCost(Integer.valueOf(symbol)));
this.add(new GenericManaCost(Integer.parseInt(symbol)));
} else if (symbol.equals("S")) {
this.add(new SnowManaCost());
} else if (symbol.equals("C")) {