Skip to content

Commit

Permalink
Conform to new Collection indexing model.
Browse files Browse the repository at this point in the history
For more info: <swiftlang/swift@9bee5d1>

Also, remove errant line break.
  • Loading branch information
jdhealy committed Jun 14, 2016
1 parent a6c6b54 commit df61232
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/Color/Wrap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ extension Color.Wrap: Collection, MutableCollection {
public var startIndex: Index { return parameters.startIndex }
public var endIndex: Index { return parameters.endIndex }

public func index(after i: Index) -> Index { return parameters.index(after: i) }
public func formIndex(after i: inout Index) { return parameters.formIndex(after: &i) }

public subscript(position:Index) -> Iterator.Element {
get { return parameters[position] }
set { parameters[position] = newValue }
Expand All @@ -210,10 +213,9 @@ extension Color.Wrap: RangeReplaceableCollection {
) {
parameters.replaceSubrange(bounds, with: newElements)
}


public mutating func reserveCapacity(n: Index.Distance) {
parameters.reserveCapacity(n)
public mutating func reserveCapacity(_ minimumCapacity: UnderlyingCollection.IndexDistance) {
parameters.reserveCapacity(minimumCapacity)
}

public mutating func append(newElement: Element) {
Expand Down

0 comments on commit df61232

Please sign in to comment.