Просмотр исходного кода

Merge pull request #467 from frankrausch/master

Reduce Swift compile time.
Wei Wang 9 лет назад
Родитель
Сommit
cfaad12d6e
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      Sources/String+MD5.swift

+ 5 - 1
Sources/String+MD5.swift

@@ -281,7 +281,11 @@ class MD5: HashProtocol {
         
         hh.forEach {
             let itemLE = $0.littleEndian
-            result += [UInt8(itemLE & 0xff), UInt8((itemLE >> 8) & 0xff), UInt8((itemLE >> 16) & 0xff), UInt8((itemLE >> 24) & 0xff)]
+            let r1 = UInt8(itemLE & 0xff)
+            let r2 = UInt8((itemLE >> 8) & 0xff)
+            let r3 = UInt8((itemLE >> 16) & 0xff)
+            let r4 = UInt8((itemLE >> 24) & 0xff)
+            result += [r1, r2, r3, r4]
         }
         return result
     }