Skip to content

Commit

Permalink
Update code.
Browse files Browse the repository at this point in the history
  • Loading branch information
neoancient committed Sep 18, 2024
1 parent 7d2f5fd commit 0eeace3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions megamek/src/megamek/common/QuadVee.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public String getMotiveTypeString() {
}

public static int getMotiveTypeForString(String inType) {
if ((inType == null) || (inType.length() < 1)) {
if ((inType == null) || (inType.isEmpty())) {
return MOTIVE_UNKNOWN;
}
for (int x = 0; x < MOTIVE_STRING.length; x++) {
Expand Down Expand Up @@ -275,14 +275,11 @@ public MPBoosters getArmedMPBoosters() {
return mpBoosters;
}

switch (mpBoosters) {
case MASC_AND_SUPERCHARGER:
return MPBoosters.SUPERCHARGER_ONLY;
case MASC_ONLY:
return MPBoosters.NONE;
default:
return mpBoosters;
}
return switch (mpBoosters) {
case MASC_AND_SUPERCHARGER -> MPBoosters.SUPERCHARGER_ONLY;
case MASC_ONLY -> MPBoosters.NONE;
default -> mpBoosters;
};
}

/**
Expand Down

0 comments on commit 0eeace3

Please sign in to comment.