Skip to content

Commit

Permalink
Merge pull request #8 from bonkey/master
Browse files Browse the repository at this point in the history
Simplify split function
  • Loading branch information
ArtSabintsev committed Feb 24, 2015
2 parents 0f0c7bb + 133bfd4 commit 8ba1ac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Siren/Siren.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ private extension Siren {

func setAlertType() -> SirenAlertType {

let oldVersion = split(currentInstalledVersion!, {$0 == "."}, maxSplit: Int.max, allowEmptySlices: false).map {$0.toInt() ?? 0}
let newVersion = split(currentAppStoreVersion!, {$0 == "."}, maxSplit: Int.max, allowEmptySlices: false).map {$0.toInt() ?? 0}
let oldVersion = split(currentInstalledVersion!) {$0 == "."}.map {$0.toInt() ?? 0}
let newVersion = split(currentAppStoreVersion!) {$0 == "."}.map {$0.toInt() ?? 0}

if oldVersion.count == 3 && newVersion.count == 3 {
if newVersion[0] > oldVersion[0] { // A.b.c
Expand Down

0 comments on commit 8ba1ac7

Please sign in to comment.