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.
loadUnaligned
1 parent 8bb22f8 commit 1b78a1fCopy full SHA for 1b78a1f
stdlib/public/core/StringUTF16View.swift
@@ -597,11 +597,11 @@ extension String.UTF16View {
597
598
while readPtr + MemoryLayout<U>.stride < endPtr {
599
//Find the number of continuations (0b10xxxxxx)
600
- let sValue = Builtin.loadRaw(readPtr._rawValue) as S
+ let sValue = readPtr.loadUnaligned(as: S.self)
601
let continuations = S.zero.replacing(with: S.one, where: sValue .< -65 + 1)
602
603
//Find the number of 4 byte code points (0b11110xxx)
604
- let uValue = Builtin.loadRaw(readPtr._rawValue) as U
+ let uValue = readPtr.loadUnaligned(as: U.self)
605
let fourBytes = S.zero.replacing(
606
with: S.one,
607
where: unsafeBitCast(
0 commit comments