@@ -107,7 +107,7 @@ open class NSIndexSet : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
107107 }
108108
109109 public convenience init ( index value: Int ) {
110- self . init ( indexesIn: NSMakeRange ( value, 1 ) )
110+ self . init ( indexesIn: NSRange ( location : value, length : 1 ) )
111111 }
112112
113113 open func isEqual( to indexSet: IndexSet ) -> Bool {
@@ -448,7 +448,7 @@ open class NSIndexSet : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
448448 enumerate ( options: [ ] , using: block)
449449 }
450450 open func enumerate( options opts: NSEnumerationOptions = [ ] , using block: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Void ) {
451- let _ = _enumerateWithOptions ( opts, range: NSMakeRange ( 0 , Int . max) , paramType: Int . self, returnType: Void . self, block: block)
451+ let _ = _enumerateWithOptions ( opts, range: NSRange ( location : 0 , length : Int . max) , paramType: Int . self, returnType: Void . self, block: block)
452452 }
453453 open func enumerate( in range: NSRange , options opts: NSEnumerationOptions = [ ] , using block: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Void ) {
454454 let _ = _enumerateWithOptions ( opts, range: range, paramType: Int . self, returnType: Void . self, block: block)
@@ -458,17 +458,17 @@ open class NSIndexSet : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
458458 return index ( options: [ ] , passingTest: predicate)
459459 }
460460 open func index( options opts: NSEnumerationOptions = [ ] , passingTest predicate: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Bool ) -> Int {
461- return _enumerateWithOptions ( opts, range: NSMakeRange ( 0 , Int . max) , paramType: Int . self, returnType: Bool . self, block: predicate) ?? NSNotFound
461+ return _enumerateWithOptions ( opts, range: NSRange ( location : 0 , length : Int . max) , paramType: Int . self, returnType: Bool . self, block: predicate) ?? NSNotFound
462462 }
463463 open func index( in range: NSRange , options opts: NSEnumerationOptions = [ ] , passingTest predicate: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Bool ) -> Int {
464464 return _enumerateWithOptions ( opts, range: range, paramType: Int . self, returnType: Bool . self, block: predicate) ?? NSNotFound
465465 }
466466
467467 open func indexes( passingTest predicate: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Bool ) -> IndexSet {
468- return indexes ( in: NSMakeRange ( 0 , Int . max) , options: [ ] , passingTest: predicate)
468+ return indexes ( in: NSRange ( location : 0 , length : Int . max) , options: [ ] , passingTest: predicate)
469469 }
470470 open func indexes( options opts: NSEnumerationOptions = [ ] , passingTest predicate: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Bool ) -> IndexSet {
471- return indexes ( in: NSMakeRange ( 0 , Int . max) , options: opts, passingTest: predicate)
471+ return indexes ( in: NSRange ( location : 0 , length : Int . max) , options: opts, passingTest: predicate)
472472 }
473473 open func indexes( in range: NSRange , options opts: NSEnumerationOptions = [ ] , passingTest predicate: ( Int , UnsafeMutablePointer < ObjCBool > ) -> Bool ) -> IndexSet {
474474 var result = IndexSet ( )
@@ -489,7 +489,7 @@ open class NSIndexSet : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
489489 enumerateRanges ( options: [ ] , using: block)
490490 }
491491 open func enumerateRanges( options opts: NSEnumerationOptions = [ ] , using block: ( NSRange , UnsafeMutablePointer < ObjCBool > ) -> Void ) {
492- let _ = _enumerateWithOptions ( opts, range: NSMakeRange ( 0 , Int . max) , paramType: NSRange . self, returnType: Void . self, block: block)
492+ let _ = _enumerateWithOptions ( opts, range: NSRange ( location : 0 , length : Int . max) , paramType: NSRange . self, returnType: Void . self, block: block)
493493 }
494494 open func enumerateRanges( in range: NSRange , options opts: NSEnumerationOptions = [ ] , using block: ( NSRange , UnsafeMutablePointer < ObjCBool > ) -> Void ) {
495495 let _ = _enumerateWithOptions ( opts, range: range, paramType: NSRange . self, returnType: Void . self, block: block)
@@ -553,11 +553,11 @@ open class NSMutableIndexSet : NSIndexSet {
553553 }
554554
555555 open func add( _ value: Int ) {
556- add ( in: NSMakeRange ( value, 1 ) )
556+ add ( in: NSRange ( location : value, length : 1 ) )
557557 }
558558
559559 open func remove( _ value: Int ) {
560- remove ( in: NSMakeRange ( value, 1 ) )
560+ remove ( in: NSRange ( location : value, length : 1 ) )
561561 }
562562
563563 internal func _insertRange( _ range: NSRange , atIndex index: Int ) {
@@ -672,16 +672,16 @@ open class NSMutableIndexSet : NSIndexSet {
672672 // Don't increment rangeIndex
673673 continue
674674 } else {
675- self . _replaceRangeAtIndex ( rangeIndex, withRange: NSMakeRange ( removeEnd, curEnd - removeEnd) )
675+ self . _replaceRangeAtIndex ( rangeIndex, withRange: NSRange ( location : removeEnd, length : curEnd - removeEnd) )
676676 return
677677 }
678678 } else if range. location > curRange. location && removeEnd < curEnd {
679- let firstPiece = NSMakeRange ( curRange. location, range. location - curRange. location)
680- let secondPiece = NSMakeRange ( removeEnd, curEnd - removeEnd)
679+ let firstPiece = NSRange ( location : curRange. location, length : range. location - curRange. location)
680+ let secondPiece = NSRange ( location : removeEnd, length : curEnd - removeEnd)
681681 _replaceRangeAtIndex ( rangeIndex, withRange: secondPiece)
682682 _insertRange ( firstPiece, atIndex: rangeIndex)
683683 } else if range. location > curRange. location && range. location < curEnd && removeEnd >= curEnd {
684- _replaceRangeAtIndex ( rangeIndex, withRange: NSMakeRange ( curRange. location, range. location - curRange. location) )
684+ _replaceRangeAtIndex ( rangeIndex, withRange: NSRange ( location : curRange. location, length : range. location - curRange. location) )
685685 }
686686 rangeIndex += 1
687687 }
0 commit comments