From 721b3d56c54f090a6142da85f206740300037252 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Fri, 2 Jul 2021 11:09:09 +0100 Subject: Use Java array declarations not C-style declarations in Android Java code --- platform/android/java/lib/src/org/godotengine/godot/Godot.java | 2 +- platform/android/java/lib/src/org/godotengine/godot/GodotIO.java | 2 +- platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'platform/android/java/lib/src/org') diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java index 4fe64bd862..ec050f2ac9 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java @@ -780,7 +780,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC int displayRotation = display.getRotation(); float[] adjustedValues = new float[3]; - final int axisSwap[][] = { + final int[][] axisSwap = { { 1, -1, 0, 1 }, // ROTATION_0 { -1, -1, 1, 0 }, // ROTATION_90 { -1, 1, 0, 1 }, // ROTATION_180 diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java index 77bf7bd870..acd45dc22c 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java @@ -386,7 +386,7 @@ public class GodotIO { Point size = new Point(); display.getRealSize(size); - int result[] = { 0, 0, size.x, size.y }; + int[] result = { 0, 0, size.x, size.y }; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { WindowInsets insets = activity.getWindow().getDecorView().getRootWindowInsets(); DisplayCutout cutout = insets.getDisplayCutout(); diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java b/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java index d6e49bb635..b05da71f8b 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java @@ -39,7 +39,7 @@ public class Crypt { // Create MD5 Hash MessageDigest digest = java.security.MessageDigest.getInstance("MD5"); digest.update(input.getBytes()); - byte messageDigest[] = digest.digest(); + byte[] messageDigest = digest.digest(); // Create Hex String StringBuffer hexString = new StringBuffer(); -- cgit v1.2.3