From: "Enrico Weigelt, metux IT consult" <[email protected]>
---
src/net/sf/freecol/common/model/UnitLocation.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/net/sf/freecol/common/model/UnitLocation.java
b/src/net/sf/freecol/common/model/UnitLocation.java
index e29cce93f0a..7bbbf03f480 100644
--- a/src/net/sf/freecol/common/model/UnitLocation.java
+++ b/src/net/sf/freecol/common/model/UnitLocation.java
@@ -250,7 +250,10 @@ public abstract class UnitLocation extends
FreeColGameObject implements Location
* @return A suitable carrier or null if none found.
*/
public Unit getCarrierForUnit(Unit unit) {
- return find(getUnits(), u -> u.couldCarry(unit));
+ for (Unit u : getUnits())
+ if (u.couldCarry(unit))
+ return u;
+ return null;
}
--
2.11.0.rc0.7.gbe5a750
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers