mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Checking a list for empty is not needed for a "for" loop.
This commit is contained in:
@@ -65,11 +65,9 @@ public class Cost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean hasSpecificCostType(Class<? extends CostPart> costType) {
|
public final boolean hasSpecificCostType(Class<? extends CostPart> costType) {
|
||||||
if (!getCostParts().isEmpty()) {
|
for (CostPart p : getCostParts()) {
|
||||||
for (CostPart p : getCostParts()) {
|
if (costType.isInstance(p)) {
|
||||||
if (costType.isInstance(p)) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user