stdlib: coding style: add parentheses to one-argument closures for

consistency with the rest of the library

Swift SVN r25036
This commit is contained in:
Dmitri Hrybenko
2015-02-06 05:38:15 +00:00
parent 46302bd305
commit b158753ae4
10 changed files with 25 additions and 25 deletions

View File

@@ -29,7 +29,7 @@ internal final class _EmptyArrayStorage
#if _runtime(_ObjC)
override func _withVerbatimBridgedUnsafeBuffer<R>(
@noescape body: UnsafeBufferPointer<AnyObject> -> R
@noescape body: (UnsafeBufferPointer<AnyObject>) -> R
) -> R? {
return body(UnsafeBufferPointer(start: nil, count: 0))
}
@@ -74,7 +74,7 @@ class _ContiguousArrayStorage1 : _ContiguousArrayStorageBase {
/// `UnsafeBufferPointer` to the elements and return the result.
/// Otherwise, return `nil`.
final override func _withVerbatimBridgedUnsafeBuffer<R>(
@noescape body: UnsafeBufferPointer<AnyObject> -> R
@noescape body: (UnsafeBufferPointer<AnyObject>) -> R
) -> R? {
var result: R? = nil
self._withVerbatimBridgedUnsafeBufferImpl {
@@ -86,7 +86,7 @@ class _ContiguousArrayStorage1 : _ContiguousArrayStorageBase {
/// If `T` is bridged verbatim, invoke `body` on an
/// `UnsafeBufferPointer` to the elements.
internal func _withVerbatimBridgedUnsafeBufferImpl(
@noescape body: UnsafeBufferPointer<AnyObject> -> Void
@noescape body: (UnsafeBufferPointer<AnyObject>) -> Void
) {
_sanityCheckFailure(
"Must override _withVerbatimBridgedUnsafeBufferImpl in derived classes")
@@ -107,7 +107,7 @@ final class _ContiguousArrayStorage<T> : _ContiguousArrayStorage1 {
/// If `T` is bridged verbatim, invoke `body` on an
/// `UnsafeBufferPointer` to the elements.
internal final override func _withVerbatimBridgedUnsafeBufferImpl(
@noescape body: UnsafeBufferPointer<AnyObject> -> Void
@noescape body: (UnsafeBufferPointer<AnyObject>) -> Void
) {
if _isBridgedVerbatimToObjectiveC(T.self) {
let count = __manager.value.count