We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ffcbc5 commit ee1713cCopy full SHA for ee1713c
stdlib/public/core/UTF16.swift
@@ -60,7 +60,9 @@ extension Unicode.UTF16 : Unicode.Encoding {
60
return Unicode.Scalar(_unchecked: bits & 0xffff)
61
}
62
_sanityCheck(source._bitCount == 32)
63
- let value = 0x10000 + (bits >> 16 & 0x03ff | (bits & 0x03ff) << 10)
+ let lower: UInt32 = bits >> 16 & 0x03ff
64
+ let upper: UInt32 = (bits & 0x03ff) << 10
65
+ let value = 0x10000 + (lower | upper)
66
return Unicode.Scalar(_unchecked: value)
67
68
0 commit comments