Skip to content

Commit

Permalink
More CME Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DrParadox7 committed Sep 25, 2023
1 parent 71b8ea9 commit 3a0cd63
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

public class TransmitterNetworkRegistry
{
Expand Down Expand Up @@ -109,8 +110,9 @@ public void removeInvalidTransmitters()
{
logger.info("Dealing with " + invalidTransmitters.size() + " invalid Transmitters");
}

for(IGridTransmitter invalid : invalidTransmitters)

Set<IGridTransmitter> orphanTransmitterCopy = new HashSet<>(invalidTransmitters);
for(IGridTransmitter invalid : orphanTransmitterCopy)
{
if(!(invalid.isOrphan() && invalid.isValid()))
{
Expand All @@ -132,8 +134,9 @@ public void assignOrphans()
{
logger.info("Dealing with " + orphanTransmitters.size() + " orphan Transmitters");
}

for(IGridTransmitter orphanTransmitter : orphanTransmitters.values())

HashMap<Coord4D, IGridTransmitter> orphanTransmitterCopy = new HashMap<Coord4D, IGridTransmitter>(orphanTransmitters);
for(IGridTransmitter orphanTransmitter : orphanTransmitterCopy.values())
{
DynamicNetwork network = getNetworkFromOrphan(orphanTransmitter);

Expand Down

0 comments on commit 3a0cd63

Please sign in to comment.