Skip to content

Commit 8103c8e

Browse files
phauslerRobert Widmann
authored and
Robert Widmann
committed
[Foundation] Reorder _DataStorage to save 14 bytes of overhead
1 parent ba854b4 commit 8103c8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Darwin/Foundation-swiftoverlay/Data.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ internal final class __DataStorage {
106106
@usableFromInline var _bytes: UnsafeMutableRawPointer?
107107
@usableFromInline var _length: Int
108108
@usableFromInline var _capacity: Int
109-
@usableFromInline var _needToZero: Bool
110-
@usableFromInline var _deallocator: ((UnsafeMutableRawPointer, Int) -> Void)?
111109
@usableFromInline var _offset: Int
112-
110+
@usableFromInline var _deallocator: ((UnsafeMutableRawPointer, Int) -> Void)?
111+
@usableFromInline var _needToZero: Bool
112+
113113
@inlinable // This is @inlinable as trivially computable.
114114
var bytes: UnsafeRawPointer? {
115115
return UnsafeRawPointer(_bytes)?.advanced(by: -_offset)

0 commit comments

Comments
 (0)