Replaced ternary operators with if statements (#346)

Instances of the ternary operator were replaced with if statements to make the code base more consistent.
This commit is contained in:
Tyler Veness
2017-11-08 23:44:03 -08:00
committed by Peter Johnson
parent c8e44256ef
commit 7efab4c43a
7 changed files with 58 additions and 39 deletions

View File

@@ -211,18 +211,20 @@ public class DriverStation implements RobotState.Interface {
} else {
locString = "";
}
boolean haveLoc = false;
String traceString = "";
for (int i = stackTraceFirst; i < stackTrace.length; i++) {
String loc = stackTrace[i].toString();
traceString += "\tat " + loc + "\n";
// get first user function
if (!haveLoc && !loc.startsWith("edu.wpi.first")) {
locString = loc;
haveLoc = true;
if (printTrace) {
boolean haveLoc = false;
for (int i = stackTraceFirst; i < stackTrace.length; i++) {
String loc = stackTrace[i].toString();
traceString += "\tat " + loc + "\n";
// get first user function
if (!haveLoc && !loc.startsWith("edu.wpi.first")) {
locString = loc;
haveLoc = true;
}
}
}
HAL.sendError(isError, code, false, error, locString, printTrace ? traceString : "", false);
HAL.sendError(isError, code, false, error, locString, traceString, true);
}
/**