Skip to content

Commit

Permalink
Remove ++ as it is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Dec 30, 2015
1 parent 5943f7c commit 100a40f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/azkaban/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import Commander

// from: http://stackoverflow.com/a/28341290
func iterateEnum<T: Hashable>(_: T.Type) -> AnyGenerator<T> {
var i = 0
var i = -1
return AnyGenerator {
i += 1
let next = withUnsafePointer(&i) { UnsafePointer<T>($0).memory }
return next.hashValue == i++ ? next : nil
return next.hashValue == i ? next : nil
}
}

Expand Down

0 comments on commit 100a40f

Please sign in to comment.