File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -258,24 +258,22 @@ internal struct _OperationList {
258
258
}
259
259
260
260
mutating func dequeue( ) -> NSOperation ? {
261
- var result : NSOperation ?
262
261
if veryHigh. count > 0 {
263
- result = veryHigh. remove ( at: 0 )
264
- } else if high. count > 0 {
265
- result = high. remove ( at: 0 )
266
- } else if normal. count > 0 {
267
- result = normal. remove ( at: 0 )
268
- } else if low. count > 0 {
269
- result = low. remove ( at: 0 )
270
- } else if veryLow. count > 0 {
271
- result = veryLow. remove ( at: 0 )
262
+ return veryHigh. remove ( at: 0 )
272
263
}
273
-
274
- if let idx = all. index ( of: result!) {
275
- all. remove ( at: idx)
264
+ if high. count > 0 {
265
+ return high. remove ( at: 0 )
276
266
}
277
-
278
- return result
267
+ if normal. count > 0 {
268
+ return normal. remove ( at: 0 )
269
+ }
270
+ if low. count > 0 {
271
+ return low. remove ( at: 0 )
272
+ }
273
+ if veryLow. count > 0 {
274
+ return veryLow. remove ( at: 0 )
275
+ }
276
+ return nil
279
277
}
280
278
281
279
var count : Int {
You can’t perform that action at this time.
0 commit comments