Explorar el Código

Fixed warning: "String+BASE64.swift:25:9: C-style for statement is deprecated and will be removed in a future version of Swift".

Damian Kołakowski hace 10 años
padre
commit
96b2fab09c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Sources/String+BASE64.swift

+ 1 - 1
Sources/String+BASE64.swift

@@ -22,7 +22,7 @@ extension String {
         
         var result = [UInt8]()
         var tmp: UInt8
-        for var index = 0; index < data.count; index = index + 3 {
+        for index in 0.stride(to: data.count, by: 3) {
             let byte = data[index]
             tmp = (byte & 0xFC) >> 2;
             result.append(CODES[Int(tmp)])