Skip to content

Commit

Permalink
Two EnumSets can be compared with .equals(), who knew?
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Sep 19, 2023
1 parent 14fba6a commit a07ab98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MekHQ/src/mekhq/campaign/parts/AmmoStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public boolean isSamePartType(@Nullable Part part) {
*/
public boolean isSameAmmoType(AmmoType otherAmmoType) {
return getType().equalsAmmoTypeOnly(otherAmmoType)
&& (getType().getMunitionType().containsAll(otherAmmoType.getMunitionType()))
&& (getType().getMunitionType().equals(otherAmmoType.getMunitionType()))
&& (getType().getRackSize() == otherAmmoType.getRackSize());
}

Expand Down

0 comments on commit a07ab98

Please sign in to comment.