mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
change to a switch statement to avoid object comparison (#2507)
This commit is contained in:
@@ -150,14 +150,15 @@ public enum Platform {
|
|||||||
public static String getNativePlatform() {
|
public static String getNativePlatform() {
|
||||||
String platPath = CombinedRuntimeLoader.getPlatformPath();
|
String platPath = CombinedRuntimeLoader.getPlatformPath();
|
||||||
|
|
||||||
if (platPath == "/linux/x86-64/") {
|
switch (platPath) {
|
||||||
return "linuxx64";
|
case "/linux/x86-64/":
|
||||||
} else if (platPath == "/windows/x86-64/") {
|
return "linuxx64";
|
||||||
return "winx64";
|
case "/windows/x86-64/":
|
||||||
} else if (platPath == "/linux/arm64/") {
|
return "winx64";
|
||||||
return "linuxarm64";
|
case "/linux/arm64/":
|
||||||
} else {
|
return "linuxarm64";
|
||||||
return "";
|
default:
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user