Replacing more C-style for loops with the faster, traditional ones. (#62908)

This commit is contained in:
Ghom
2021-11-19 02:39:05 +01:00
committed by GitHub
parent d4f4e05a37
commit 243cd2bfa5
26 changed files with 60 additions and 60 deletions
+2 -2
View File
@@ -38,8 +38,8 @@
for(var/i = 1, i <= length_input, i += length(char)) //put the guess into a list
char = input[i]
sanitised += text2num(char)
for(var/i = 1, i <= length(sanitised) - 1, i++) //compare each digit in the guess to all those following it
for(var/j = i + 1, j <= length(sanitised), j++)
for(var/i in 1 to length(sanitised) - 1) //compare each digit in the guess to all those following it
for(var/j in i + 1 to length(sanitised))
if(sanitised[i] == sanitised[j])
sanitycheck = FALSE //if a digit is repeated, reject the input
if(input == code)