1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Replace index iterators with for each loops.

(cherry picked from commit 334ebd7eb7)
This commit is contained in:
Marcel Admiraal
2022-04-23 09:45:44 +02:00
committed by Rémi Verschelde
parent 23b649b673
commit 76b5c31433
2 changed files with 4 additions and 5 deletions

View File

@@ -1019,9 +1019,8 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
// Create Hex String // Create Hex String
StringBuilder hexString = new StringBuilder(); StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++) { for (byte b : messageDigest) {
String s = Integer.toHexString(0xFF & messageDigest[i]); String s = Integer.toHexString(0xFF & b);
if (s.length() == 1) { if (s.length() == 1) {
s = "0" + s; s = "0" + s;
} }

View File

@@ -43,8 +43,8 @@ public class Crypt {
// Create Hex String // Create Hex String
StringBuilder hexString = new StringBuilder(); StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++) for (byte b : messageDigest)
hexString.append(Integer.toHexString(0xFF & messageDigest[i])); hexString.append(Integer.toHexString(0xFF & b));
return hexString.toString(); return hexString.toString();
} catch (Exception e) { } catch (Exception e) {