Skip to content

Commit

Permalink
[Array] Change swap function to generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Sep 10, 2016
1 parent 7d8fa16 commit 7a2eb26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion String/ReverseVowelsOfAString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ReverseVowelsOfAString {
return false
}

private func _swap(inout chars: [Character], _ p: Int, _ q: Int) {
private func _swap<T>(inout chars: Array<T>, _ p: Int, _ q: Int) {
var temp = chars[p]
chars[p] = chars[q]
chars[q] = temp
Expand Down

0 comments on commit 7a2eb26

Please sign in to comment.