mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user