Skip to content

Commit

Permalink
[gardening] Fix some recently introduced typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Jun 19, 2016
1 parent b45cdd3 commit 8d03ea1
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ namespace {
constexpr unsigned MaxLSLocationBBMultiplicationNone = 256*256;

/// we could run optimistic DSE on functions with less than 64 basic blocks
/// and 64 locations which is a sizeable function.
/// and 64 locations which is a sizable function.
constexpr unsigned MaxLSLocationBBMultiplicationPessimistic = 64*64;

/// forward declaration.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ namespace {
constexpr unsigned MaxLSLocationBBMultiplicationNone = 128*128;

/// we could run optimistic RLE on functions with less than 64 basic blocks
/// and 64 locations which is a sizeable function.
/// and 64 locations which is a sizable function.
constexpr unsigned MaxLSLocationBBMultiplicationPessimistic = 64*64;

/// forward declaration.
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Dispatch/Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public struct DispatchData : RandomAccessCollection, _ObjectiveCBridgeable {

public struct DispatchDataIterator : IteratorProtocol, Sequence {

/// Create an iterator over the given DisaptchData
/// Create an iterator over the given DispatchData
public init(_data: DispatchData) {
var ptr: UnsafePointer<Void>?
self._count = 0
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/AffineTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ extension AffineTransform : ReferenceConvertible, Hashable, CustomStringConverti
}

/**
Inverts the transformation matrix if possible. Matricies with a determinant that is less than
Inverts the transformation matrix if possible. Matrices with a determinant that is less than
the smallest valid representation of a double value greater than zero are considered to be
invalid for representing as an inverse. If the input AffineTransform can potentially fall into
this case then the inverted() method is suggested to be used instead since that will return
Expand Down
6 changes: 3 additions & 3 deletions stdlib/public/SDK/Foundation/Boxing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal protocol _MutablePairBoxing {
extension _MutablePairBoxing {
@inline(__always)
func _mapUnmanaged<ReturnType>(_ whatToDo : @noescape (WrappedSwiftNSType.ImmutableType) throws -> ReturnType) rethrows -> ReturnType {
// We are using Unmananged. Make sure that the owning container class
// We are using Unmanaged. Make sure that the owning container class
// 'self' is guaranteed to be alive by extending the lifetime of 'self'
// to the end of the scope of this function.
// Note: At the time of this writing using withExtendedLifetime here
Expand All @@ -169,7 +169,7 @@ extension _MutablePairBoxing {

@inline(__always)
mutating func _applyUnmanagedMutation<ReturnType>(_ whatToDo : @noescape (WrappedSwiftNSType.MutableType) throws -> ReturnType) rethrows -> ReturnType {
// We are using Unmananged. Make sure that the owning container class
// We are using Unmanaged. Make sure that the owning container class
// 'self' is guaranteed to be alive by extending the lifetime of 'self'
// to the end of the scope of this function.
// Note: At the time of this writing using withExtendedLifetime here
Expand All @@ -182,7 +182,7 @@ extension _MutablePairBoxing {
let _unmanagedHandle = Unmanaged.passUnretained(_wrapped)
let wrapper = _unmanagedHandle._withUnsafeGuaranteedRef { $0.__wrapped }

// This check is done twice becaue: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
// This check is done twice because: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
switch (wrapper) {
case .Immutable(_):
break
Expand Down
8 changes: 4 additions & 4 deletions stdlib/public/SDK/Foundation/Date.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ public struct Date : ReferenceConvertible, Comparable, Equatable, CustomStringCo
/// Return a new `Date` by adding a `TimeInterval` to this `Date`.
///
/// - parameter timeInterval: The value to add, in seconds.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
public func addingTimeInterval(_ timeInterval : TimeInterval) -> Date {
return self + timeInterval
}

/// Add a `TimeInterval` to this `Date`.
///
/// - parameter timeInterval: The value to add, in seconds.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
public mutating func addTimeInterval(_ timeInterval: TimeInterval) {
self += timeInterval
}
Expand Down Expand Up @@ -215,14 +215,14 @@ public func -(lhs: Date, rhs: TimeInterval) -> Date {

/// Add a `TimeInterval` to a `Date`.
///
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
public func +=(lhs: inout Date, rhs: TimeInterval) {
lhs = lhs + rhs
}

/// Subtract a `TimeInterval` from a `Date`.
///
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
public func -=(lhs: inout Date, rhs: TimeInterval) {
lhs = lhs - rhs
}
Expand Down
6 changes: 3 additions & 3 deletions stdlib/public/SDK/Foundation/Measurement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public func *<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Double) -> Measu
return Measurement(value: lhs.value * rhs, unit: lhs.unit)
}

/// Multiply a scalar value by a measurment.
/// Multiply a scalar value by a measurement.
/// - returns: A measurement of value `lhs * rhs.value` with the same unit as `rhs`.
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
public func *<UnitType : Unit>(lhs: Double, rhs: Measurement<UnitType>) -> Measurement<UnitType> {
Expand Down Expand Up @@ -188,7 +188,7 @@ public func <<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<Unit
/// Compare two measurements of the same `Dimension`.
///
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
/// - returns: `true` if `lhs` is less than than `rhs`.
/// - returns: `true` if `lhs` is less than `rhs`.
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
public func <<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Bool {
if lhs.unit == rhs.unit {
Expand All @@ -210,7 +210,7 @@ public func ><UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<Unit
/// Compare two measurements of the same `Dimension`.
///
/// If `lhs.unit == rhs.unit`, returns `lhs.value > rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
/// - returns: `true` if `lhs` is greater than than `rhs`.
/// - returns: `true` if `lhs` is greater than `rhs`.
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
public func ><UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Bool {
if lhs.unit == rhs.unit {
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/URLComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public struct URLComponents : ReferenceConvertible, Hashable, CustomStringConver
///
/// The setter combines an array containing any number of `URLQueryItem`s, each of which represents a single key-value pair, into a query string and sets the `URLComponents` query property. Passing an empty array sets the query component of the `URLComponents` to an empty string. Passing nil removes the query component of the `URLComponents`.
///
/// - note: If a name-value pair in a query is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a `URLQueryItem` with a zero-length name and and a nil value. If a query's name-value pair has nothing before the equals sign, you get a zero-length name. If a query's name-value pair has nothing after the equals sign, you get a zero-length value. If a query's name-value pair has no equals sign, the query name-value pair string is the name and you get a nil value.
/// - note: If a name-value pair in a query is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a `URLQueryItem` with a zero-length name and a nil value. If a query's name-value pair has nothing before the equals sign, you get a zero-length name. If a query's name-value pair has nothing after the equals sign, you get a zero-length value. If a query's name-value pair has no equals sign, the query name-value pair string is the name and you get a nil value.
@available(OSX 10.10, iOS 8.0, *)
public var queryItems: [URLQueryItem]? {
get { return _handle.map { $0.queryItems?.map { return $0 as URLQueryItem } } }
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Foundation/URLRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public struct URLRequest : ReferenceConvertible, CustomStringConvertible, Equata

/// Returns the timeout interval of the receiver.
/// - discussion: The timeout interval specifies the limit on the idle
/// interval alloted to a request in the process of loading. The "idle
/// interval allotted to a request in the process of loading. The "idle
/// interval" is defined as the period of time that has passed since the
/// last instance of load activity occurred for a request that is in the
/// process of loading. Hence, when an instance of load activity occurs
Expand Down Expand Up @@ -111,7 +111,7 @@ public struct URLRequest : ReferenceConvertible, CustomStringConvertible, Equata
}

/// `true` if the receiver is allowed to use the built in cellular radios to
/// satify the request, `false` otherwise.
/// satisfy the request, `false` otherwise.
@available(OSX 10.8, iOS 6.0, *)
public var allowsCellularAccess: Bool {
get {
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/UUID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct UUID : ReferenceConvertible, Hashable, Equatable, CustomStringConv
self.uuid = uuid
}

/// Returns a string created from the the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F"
/// Returns a string created from the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F"
public var uuidString: String {
var bytes: uuid_string_t = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
var localValue = uuid
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/TestAffineTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class TestAffineTransform : TestAffineTransformSuper {
}

func test_hashing_values() {
// the transforms are made up and the values dont matter
// the transforms are made up and the values don't matter
let values = [
AffineTransform(m11: 1.0, m12: 2.5, m21: 66.2, m22: 40.2, tX: -5.5, tY: 3.7),
AffineTransform(m11: -55.66, m12: 22.7, m21: 1.5, m22: 0.0, tX: -22, tY: -33),
Expand Down
4 changes: 2 additions & 2 deletions test/1_stdlib/TestData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,8 @@ class TestData : TestDataSuper {
free(underlyingBuffer)
}

func expectOverride<T: _ObjectiveCBridgeable>(_ convertable: T, _ selector: String) {
expectNotEqual(class_getMethodImplementation(T._ObjectiveCType.self, sel_getUid(selector)), class_getMethodImplementation(object_getClass(convertable._bridgeToObjectiveC()), sel_getUid(selector)), "The bridge of \(T.self) should override \(selector)")
func expectOverride<T: _ObjectiveCBridgeable>(_ convertible: T, _ selector: String) {
expectNotEqual(class_getMethodImplementation(T._ObjectiveCType.self, sel_getUid(selector)), class_getMethodImplementation(object_getClass(convertible._bridgeToObjectiveC()), sel_getUid(selector)), "The bridge of \(T.self) should override \(selector)")
}

func test_bridgeOverrides() {
Expand Down
6 changes: 3 additions & 3 deletions test/1_stdlib/TestUserInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ struct SomeStructure {

/*
Notification and potentially other structures require a representation of a
userInfo dictionary. The objective-c counterparts are represented via
userInfo dictionary. The Objective-C counterparts are represented via
NSDictionary which can only store a hashable key (actually
NSObject<NSCopying> *) and a value of AnyObject (actually NSObject *). However
it is desired in swift to store Any in the value. These structure expositions
in swift have an adapter that allows them to pass a specialized NSDictionary
subclass to the objective-c layer that can round trip the stored Any types back
out into swift.
subclass to the Objective-C layer that can round trip the stored Any types back
out into Swift.

In this case NSNotification -> Notification bridging is suitable to verify that
behavior.
Expand Down

0 comments on commit 8d03ea1

Please sign in to comment.