mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Replace _HeapBuffer with a thin wrapper
...over ManagedBufferPointer
This commit is contained in:
@@ -88,7 +88,7 @@ public struct _StringBuffer {
|
||||
|
||||
self.usedEnd = start + (initialSize &<< elementShift)
|
||||
_storage.value.capacityAndElementShift
|
||||
= ((_storage._capacity() - capacityBump) &<< 1) + elementShift
|
||||
= ((_storage.capacity - capacityBump) &<< 1) + elementShift
|
||||
}
|
||||
|
||||
static func fromCodeUnits<Input : Sequence, Encoding : _UnicodeEncoding>(
|
||||
@@ -195,7 +195,7 @@ public struct _StringBuffer {
|
||||
}
|
||||
|
||||
var _anyObject: AnyObject? {
|
||||
return _storage.storage != nil ? _storage.storage! : nil
|
||||
return _storage.storage
|
||||
}
|
||||
|
||||
var _storage: _Storage
|
||||
|
||||
Reference in New Issue
Block a user