Skip to content

Commit

Permalink
Fix linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Feb 24, 2024
1 parent 96b0a09 commit 4d8ab12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions MekHQ/src/mekhq/campaign/unit/CargoStatistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ public double getCargoTonnage(final boolean inTransit, final boolean mothballed)

double cargoTonnage = 0;
double mothballedTonnage = 0;
int mechs = stats.getNumberOfUnitsByType(Entity.ETYPE_MECH);
int ds = stats.getNumberOfUnitsByType(Entity.ETYPE_DROPSHIP);
int sc = stats.getNumberOfUnitsByType(Entity.ETYPE_SMALL_CRAFT);
int cf = stats.getNumberOfUnitsByType(Entity.ETYPE_CONV_FIGHTER);
int asf = stats.getNumberOfUnitsByType(Entity.ETYPE_AEROSPACEFIGHTER);
int inf = stats.getNumberOfUnitsByType(Entity.ETYPE_INFANTRY);
int ba = stats.getNumberOfUnitsByType(Entity.ETYPE_BATTLEARMOR);
int lv = stats.getNumberOfUnitsByType(Entity.ETYPE_TANK, true);
int hv = stats.getNumberOfUnitsByType(Entity.ETYPE_TANK, false);
int protos = stats.getNumberOfUnitsByType(Entity.ETYPE_PROTOMECH);

cargoTonnage += getCampaign().getWarehouse().streamSpareParts().filter(p -> inTransit || p.isPresent())
.mapToDouble(p -> p.getQuantity() * p.getTonnage())
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/src/mekhq/campaign/unit/HangarStatistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public int getNumberOfUnitsByType(long type, boolean inTransit) {
/**
* Tally all used bay types and return a hashmap of ETYPE : Count
* @param inTransit
* @param lv
* @return
*/
public HashMap<Long, Integer> tallyBaysByType(boolean inTransit) {
HashMap<Long, Integer> hashMap = new HashMap<>();

for (Unit unit : getHangar().getUnits()) {
if (!inTransit && !unit.isPresent()) {
continue;
Expand Down

0 comments on commit 4d8ab12

Please sign in to comment.