Reverting certain swift 4.1 mandatory changes.
This commit is contained in:
parent
7f3dfc7278
commit
49fa5ce305
|
@ -1,4 +1,4 @@
|
||||||
osx_image: xcode9.3
|
osx_image: xcode9.2
|
||||||
language: objective-c
|
language: objective-c
|
||||||
rvm: 2.2.2
|
rvm: 2.2.2
|
||||||
cache: cocoapods
|
cache: cocoapods
|
||||||
|
|
|
@ -114,7 +114,7 @@ extension Array where Element: Equatable {
|
||||||
|
|
||||||
/// EZSE: Returns the indexes of the object
|
/// EZSE: Returns the indexes of the object
|
||||||
public func indexes(of element: Element) -> [Int] {
|
public func indexes(of element: Element) -> [Int] {
|
||||||
return enumerated().compactMap { ($0.element == element) ? $0.offset : nil }
|
return enumerated().flatMap { ($0.element == element) ? $0.offset : nil }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EZSE: Returns the last index of the object
|
/// EZSE: Returns the last index of the object
|
||||||
|
|
|
@ -78,7 +78,7 @@ public struct ez {
|
||||||
|
|
||||||
/// EZSE: Returns true if its simulator and not a device //TODO: Add to readme
|
/// EZSE: Returns true if its simulator and not a device //TODO: Add to readme
|
||||||
public static var isSimulator: Bool {
|
public static var isSimulator: Bool {
|
||||||
#if targetEnvironment(simulator)
|
#if (arch(i386) || arch(x86_64)) && os(iOS)
|
||||||
return true
|
return true
|
||||||
#else
|
#else
|
||||||
return false
|
return false
|
||||||
|
@ -87,7 +87,7 @@ public struct ez {
|
||||||
|
|
||||||
/// EZSE: Returns true if its on a device and not a simulator //TODO: Add to readme
|
/// EZSE: Returns true if its on a device and not a simulator //TODO: Add to readme
|
||||||
public static var isDevice: Bool {
|
public static var isDevice: Bool {
|
||||||
#if targetEnvironment(simulator)
|
#if (arch(i386) || arch(x86_64)) && os(iOS)
|
||||||
return false
|
return false
|
||||||
#else
|
#else
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue