Miscallaneous Cleanup (#5703)

* Cleanup - Unnecessary Boxing

* Cleanup - Unnecessary Unboxing

* Cleanup - For-Each Loops

* Cleanup - `indexOf != -1` -> `contains`

* Cleanup - Merge identical catch blocks

* Cleanup - Try-with-resources

* Cleanup - System.lineSeparator

* Cleanup - Reference types to primitives
Some loops over Integers were switched to IntStreams to hopefully cut down on overall boxing.

* Cleanup - Manually filling and copying arrays

* Remove unused imports

* Switch a lambda to a method reference

---------

Co-authored-by: Jetz <Jetz722@gmail.com>
This commit is contained in:
Jetz72
2024-07-29 10:23:43 -04:00
committed by GitHub
parent 5d959ca545
commit 3968c7e197
163 changed files with 370 additions and 497 deletions

View File

@@ -75,7 +75,7 @@ public class Main {
// Place the file "switch_orientation.ini" to your assets folder to make the game switch to landscape orientation (unless desktopMode = true)
String switchOrientationFile = assetsDir + "switch_orientation.ini";
Boolean landscapeMode = FileUtil.doesFileExist(switchOrientationFile) || cmd.hasOption("landscape");
boolean landscapeMode = FileUtil.doesFileExist(switchOrientationFile) || cmd.hasOption("landscape");
String[] res;
// Width and height for standard smartphone/tablet mode (desktopMode = false)