File tree Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,6 @@ internal final class __EmptyArrayStorage
40
40
return try body ( UnsafeBufferPointer ( start: nil , count: 0 ) )
41
41
}
42
42
43
- @nonobjc
44
- override internal func _getNonVerbatimBridgedCount( ) -> Int {
45
- return 0
46
- }
47
-
48
43
override internal func _getNonVerbatimBridgingBuffer( ) -> _BridgingBuffer {
49
44
return _BridgingBuffer ( 0 )
50
45
}
@@ -111,17 +106,6 @@ internal final class _ContiguousArrayStorage<
111
106
}
112
107
}
113
108
114
- /// Returns the number of elements in the array.
115
- ///
116
- /// - Precondition: `Element` is bridged non-verbatim.
117
- @nonobjc
118
- override internal func _getNonVerbatimBridgedCount( ) -> Int {
119
- _internalInvariant (
120
- !_isBridgedVerbatimToObjectiveC( Element . self) ,
121
- " Verbatim bridging should be handled separately " )
122
- return countAndCapacity. count
123
- }
124
-
125
109
/// Bridge array elements and return a new buffer that owns them.
126
110
///
127
111
/// - Precondition: `Element` is bridged non-verbatim.
Original file line number Diff line number Diff line change @@ -232,13 +232,7 @@ extension __SwiftNativeNSArrayWithContiguousStorage : _NSArrayCore {
232
232
/// bridging of array elements.
233
233
@objc
234
234
internal override var count : Int {
235
- if let bridgedStorage = _heapBufferBridged {
236
- return _BridgingBuffer ( bridgedStorage) . count
237
- }
238
-
239
- // Check if elements are bridged verbatim.
240
- return _nativeStorage. _withVerbatimBridgedUnsafeBuffer { $0. count }
241
- ?? _nativeStorage. _getNonVerbatimBridgedCount ( )
235
+ return _nativeStorage. countAndCapacity. count
242
236
}
243
237
}
244
238
#else
@@ -294,12 +288,6 @@ internal class __ContiguousArrayStorageBase
294
288
" Concrete subclasses must implement _withVerbatimBridgedUnsafeBuffer " )
295
289
}
296
290
297
- @nonobjc
298
- internal func _getNonVerbatimBridgedCount( ) -> Int {
299
- _internalInvariantFailure (
300
- " Concrete subclasses must implement _getNonVerbatimBridgedCount " )
301
- }
302
-
303
291
internal func _getNonVerbatimBridgingBuffer( ) -> _BridgingBuffer {
304
292
_internalInvariantFailure (
305
293
" Concrete subclasses must implement _getNonVerbatimBridgingBuffer " )
You can’t perform that action at this time.
0 commit comments