IOS-1540 Back out 6a92f92d825c: Using new errorAndCrash. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Tue, 11 Jun 2019 16:28:31 +0200
branchIOS-1540_GOOD
changeset 8999054ddf403456
parent 8998 ed840535b98a
child 9000 6e4119a0d977
IOS-1540 Back out 6a92f92d825c: Using new errorAndCrash.
Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift
     1.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Tue Jun 11 16:28:31 2019 +0200
     1.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Tue Jun 11 16:28:31 2019 +0200
     1.3 @@ -51,7 +51,7 @@
     1.4          defer { objc_sync_exit(self) }
     1.5  
     1.6          guard isValidIndex(index) else {
     1.7 -            Log.shared.errorAndCrash(message: "Index out of range")
     1.8 +            Log.shared.errorAndCrash("Index out of range")
     1.9              return
    1.10          }
    1.11          set.removeObject(at: index)
    1.12 @@ -62,7 +62,7 @@
    1.13          defer { objc_sync_exit(self) }
    1.14  
    1.15          guard isValidIndex(index) else {
    1.16 -            Log.shared.errorAndCrash(message: "Index out of range")
    1.17 +            Log.shared.errorAndCrash("Index out of range")
    1.18              return
    1.19          }
    1.20          set.replaceObject(at: index, with: object)
    1.21 @@ -73,7 +73,7 @@
    1.22          defer { objc_sync_exit(self) }
    1.23  
    1.24          guard isValidIndex(index) else {
    1.25 -            Log.shared.errorAndCrash(message: "Index out of range")
    1.26 +            Log.shared.errorAndCrash("Index out of range")
    1.27              return nil
    1.28          }
    1.29  
    1.30 @@ -101,7 +101,7 @@
    1.31  
    1.32          for i in 0..<set.count {
    1.33              guard let testee = set.object(at: i) as? T else {
    1.34 -                Log.shared.errorAndCrash(message: "error casting")
    1.35 +                Log.shared.errorAndCrash("error casting")
    1.36                  return NSNotFound
    1.37              }
    1.38              if testee == object {
    1.39 @@ -187,7 +187,7 @@
    1.40          set.sort { (first: Any, second: Any) -> ComparisonResult in
    1.41              guard let firstT = first as? T,
    1.42                  let secondT = second as? T else {
    1.43 -                    Log.shared.errorAndCrash(message: "Error casting.")
    1.44 +                    Log.shared.errorAndCrash("Error casting.")
    1.45                      return .orderedSame
    1.46              }
    1.47              return sortBlock(firstT, secondT)
    1.48 @@ -197,7 +197,7 @@
    1.49      private func indexOfObjectIfInserted(obj: T) -> Int {
    1.50          for i in 0..<set.count {
    1.51              guard let testee = set.object(at: i) as? T else {
    1.52 -                Log.shared.errorAndCrash(message: "Error casing")
    1.53 +                Log.shared.errorAndCrash("Error casing")
    1.54                  return 0
    1.55              }
    1.56              if set.count == 0 {