mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
This commit is contained in:
@@ -77,7 +77,7 @@ public protocol UnicodeCodec {
|
||||
/// calling `processCodeUnit` on each `CodeUnit`.
|
||||
static func encode(
|
||||
_ input: UnicodeScalar,
|
||||
@noescape sendingOutputTo processCodeUnit: (CodeUnit) -> Void
|
||||
sendingOutputTo processCodeUnit: @noescape (CodeUnit) -> Void
|
||||
)
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public struct UTF8 : UnicodeCodec {
|
||||
/// calling `processCodeUnit` on each `CodeUnit`.
|
||||
public static func encode(
|
||||
_ input: UnicodeScalar,
|
||||
@noescape sendingOutputTo processCodeUnit: (CodeUnit) -> Void
|
||||
sendingOutputTo processCodeUnit: @noescape (CodeUnit) -> Void
|
||||
) {
|
||||
var c = UInt32(input)
|
||||
var buf3 = UInt8(c & 0xFF)
|
||||
@@ -457,7 +457,7 @@ public struct UTF16 : UnicodeCodec {
|
||||
/// calling `processCodeUnit` on each `CodeUnit`.
|
||||
public static func encode(
|
||||
_ input: UnicodeScalar,
|
||||
@noescape sendingOutputTo processCodeUnit: (CodeUnit) -> Void
|
||||
sendingOutputTo processCodeUnit: @noescape (CodeUnit) -> Void
|
||||
) {
|
||||
let scalarValue: UInt32 = UInt32(input)
|
||||
|
||||
@@ -517,7 +517,7 @@ public struct UTF32 : UnicodeCodec {
|
||||
/// calling `processCodeUnit` on each `CodeUnit`.
|
||||
public static func encode(
|
||||
_ input: UnicodeScalar,
|
||||
@noescape sendingOutputTo processCodeUnit: (CodeUnit) -> Void
|
||||
sendingOutputTo processCodeUnit: @noescape (CodeUnit) -> Void
|
||||
) {
|
||||
processCodeUnit(UInt32(input))
|
||||
}
|
||||
@@ -539,7 +539,7 @@ public func transcode<
|
||||
from inputEncoding: InputEncoding.Type,
|
||||
to outputEncoding: OutputEncoding.Type,
|
||||
stoppingOnError stopOnError: Bool,
|
||||
@noescape sendingOutputTo processCodeUnit: (OutputEncoding.CodeUnit) -> Void
|
||||
sendingOutputTo processCodeUnit: @noescape (OutputEncoding.CodeUnit) -> Void
|
||||
) -> Bool {
|
||||
var input = input
|
||||
|
||||
|
||||
Reference in New Issue
Block a user