little bit of cleanup -- use result of test for errors in each branch to determine whether to report a simulation error, instead of duplicating the code

This commit is contained in:
JoePfeiffer 2024-07-19 09:15:42 -06:00
parent aa64eedad2
commit b1b1690773

View File

@ -356,7 +356,7 @@ public class Simulation implements ChangeSource, Cloneable {
public boolean hasErrors() {
FlightData data = getSimulatedData();
for (int branchNo = 0; branchNo < data.getBranchCount(); branchNo++) {
if (data.getBranch(branchNo).getFirstEvent(FlightEvent.Type.SIM_ABORT) != null) {
if (hasErrors(branchNo)) {
return true;
}
}