Improve lime.tools.Platform type safety.

We shouldn't have to cast it every time!
This commit is contained in:
Joseph Cloutier
2024-01-12 15:12:24 -05:00
parent 31ad76f888
commit 9718b8a454
3 changed files with 25 additions and 19 deletions

View File

@@ -231,31 +231,31 @@ class CommandLineTools
switch (targetName)
{
case "cpp":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cpp", "");
case "neko":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("neko", "");
case "hl", "hashlink":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("hl", "");
case "cppia":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cppia", "");
case "java":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("java", "");
case "nodejs":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("nodejs", "");
case "cs":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cs", "");
case "iphone", "iphoneos":
@@ -1511,31 +1511,31 @@ class CommandLineTools
switch (targetName)
{
case "cpp":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cpp", "");
case "neko":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("neko", "");
case "hl", "hashlink":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("hl", "");
case "cppia":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cppia", "");
case "java":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("java", "");
case "nodejs":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("nodejs", "");
case "cs":
target = cast System.hostPlatform;
target = System.hostPlatform;
targetFlags.set("cs", "");
case "iphone", "iphoneos":