File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ void onFrame(final int frame) {
328328 List <Unit > getConnected (final Unit unit ) {
329329 final int frame = getFrameCount ();
330330 if (lastConnectedUnitsUpdate < frame ) {
331- connectedUnits .clear ( );
331+ connectedUnits .values (). forEach ( List :: clear );
332332 for (final Unit u : getAllUnits ()) {
333333 Unit owner = u .getCarrier ();
334334 if (owner == null ) {
@@ -355,7 +355,7 @@ List<Unit> getConnected(final Unit unit) {
355355 List <Unit > getLoadedUnits (final Unit unit ) {
356356 final int frame = getFrameCount ();
357357 if (lastLoadedUnitsUpdate < frame ) {
358- loadedUnits .clear ( );
358+ loadedUnits .values (). forEach ( List :: clear );
359359 for (final Unit u : getAllUnits ()) {
360360 final Unit owner = u .getTransport ();
361361 if (owner != null ) {
You can’t perform that action at this time.
0 commit comments