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:
parent
aa64eedad2
commit
b1b1690773
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user