Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Bowen <39067288+Windchild292@users.noreply.github.com>
  • Loading branch information
NickAragua and Windchild292 authored Jul 12, 2021
1 parent b01c072 commit 84d73a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions megamek/src/megamek/common/FighterSquadron.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ public int getCurrentThrust() {

@Override
public int getFuel() {
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero)ent).getFuel()).min().orElse(0);
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero) ent).getFuel()).min().orElse(0);
}

@Override
public int getCurrentFuel() {
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero)ent).getCurrentFuel()).min().orElse(0);
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero) ent).getCurrentFuel()).min().orElse(0);
}

/*
Expand Down Expand Up @@ -241,8 +241,8 @@ public PilotingRollData addEntityBonuses(PilotingRollData prd) {
@Override
public int getClusterMods() {
return getActiveSubEntities().stream()
.filter(ent -> (((IAero)ent).getFCSHits() <= 2))
.mapToInt(ent -> ((IAero)ent).getClusterMods()).sum();
.filter(ent -> (((IAero) ent).getFCSHits() <= 2))
.mapToInt(ent -> ((IAero) ent).getClusterMods()).sum();
}

@Override
Expand Down Expand Up @@ -276,7 +276,7 @@ public int calculateBattleValue() {

@Override
public int getHeatSinks() {
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero)ent).getHeatSinks()).sum();
return getActiveSubEntities().stream().mapToInt(ent -> ((IAero) ent).getHeatSinks()).sum();
}

@Override
Expand Down Expand Up @@ -323,7 +323,7 @@ public HitData rollHitLocation(int table, int side, int aimedLocation, int aimin
List<Entity> activeFighters = getActiveSubEntities();

// If this squadron is doomed or is of size 1 then just return the first one
if (isDoomed() || activeFighters.size() <= 1) {
if (isDoomed() || (activeFighters.size() <= 1)) {
return new HitData(0);
}

Expand Down

0 comments on commit 84d73a1

Please sign in to comment.