Make documented complexity consistent

Since most of the documentation in the code use O(`self.count`) instead of O(`count`), change the inconsistent code documentation to O(`self.count`).
This commit is contained in:
Patrick
2015-12-04 17:15:09 -08:00
parent 9d74b1d661
commit 14fdf744b0
3 changed files with 6 additions and 6 deletions

View File

@@ -1078,7 +1078,7 @@ public struct Dictionary<Key : Hashable, Value> :
///
/// Invalidates all indices with respect to `self`.
///
/// - Complexity: O(`count`).
/// - Complexity: O(`self.count`).
public mutating func removeAtIndex(index: Index) -> Element {
return _variantStorage.removeAtIndex(index)
}
@@ -1101,7 +1101,7 @@ public struct Dictionary<Key : Hashable, Value> :
/// storage capacity that the collection has, otherwise the underlying
/// storage is released. The default is `false`.
///
/// Complexity: O(`count`).
/// Complexity: O(`self.count`).
public mutating func removeAll(keepCapacity keepCapacity: Bool = false) {
// The 'will not decrease' part in the documentation comment is worded very
// carefully. The capacity can increase if we replace Cocoa storage with