Merge pull request #50074 from madmiraal/android-replace-c-array

Use Java array declarations not C-style declarations in Android Java code
This commit is contained in:
Rémi Verschelde 2021-07-02 13:44:22 +02:00 committed by GitHub
commit 6ef0b8fcd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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();

View file

@ -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();