mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
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:
committed by
Peter Johnson
parent
c8e44256ef
commit
7efab4c43a
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user