Skip to content

Commit

Permalink
Remove unused computeInactiveCampaigns method
Browse files Browse the repository at this point in the history
  • Loading branch information
sixlettervariables committed Mar 13, 2020
1 parent ad4b36a commit 1e0cf55
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions MekHQ/src/mekhq/campaign/CampaignController.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

Expand Down Expand Up @@ -168,15 +167,6 @@ public int getActiveCampaignCount() {
return remoteCampaigns.reduceValuesToInt(Integer.MAX_VALUE, rc -> rc.isActive() ? 1 : 0, 0, (x, acc) -> x + acc);
}

/**
* Computes the set of inactive campaigns from a set of active campaign IDs.
*/
public void computeInactiveCampaigns(Set<UUID> activeCampaigns) {
for (UUID clientId : remoteCampaigns.keySet()) {
remoteCampaigns.computeIfPresent(clientId, (key, rc) -> activeCampaigns.contains(clientId) ? rc : rc.withActive(false));
}
}

/**
* Advances the local {@link Campaign} to the next day.
*/
Expand Down

0 comments on commit 1e0cf55

Please sign in to comment.