Fix build for Swift 5.0.1
This commit is contained in:
parent
0bc2d8cb8a
commit
2084e04257
|
|
@ -5,6 +5,7 @@
|
||||||
// Created by Christian Treffs on 25.06.19.
|
// Created by Christian Treffs on 25.06.19.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if swift(>=5.1)
|
||||||
@dynamicMemberLookup
|
@dynamicMemberLookup
|
||||||
public struct ReadableOnly<Comp> where Comp: Component {
|
public struct ReadableOnly<Comp> where Comp: Component {
|
||||||
@usableFromInline let component: Comp
|
@usableFromInline let component: Comp
|
||||||
|
|
@ -31,3 +32,4 @@ public struct Writable<Comp> where Comp: Component {
|
||||||
nonmutating set { component[keyPath: keyPath] = newValue }
|
nonmutating set { component[keyPath: keyPath] = newValue }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -104,4 +104,9 @@ public struct Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Equatable
|
// MARK: - Equatable
|
||||||
extension Entity: Equatable { }
|
extension Entity: Equatable {
|
||||||
|
public static func == (lhs: Entity, rhs: Entity) -> Bool {
|
||||||
|
return lhs.nexus == rhs.nexus &&
|
||||||
|
lhs.identifier == rhs.identifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,4 +124,9 @@ extension Family {
|
||||||
extension Family.EntityComponentIterator: LazySequenceProtocol { }
|
extension Family.EntityComponentIterator: LazySequenceProtocol { }
|
||||||
|
|
||||||
// MARK: - Equatable
|
// MARK: - Equatable
|
||||||
extension Family: Equatable { }
|
extension Family: Equatable {
|
||||||
|
public static func == (lhs: Family<R>, rhs: Family<R>) -> Bool {
|
||||||
|
return lhs.nexus == rhs.nexus &&
|
||||||
|
lhs.traits == rhs.traits
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
import FirebladeECS
|
import FirebladeECS
|
||||||
import XCTest
|
import XCTest
|
||||||
|
|
||||||
|
#if swift(>=5.1)
|
||||||
class AccessTests: XCTestCase {
|
class AccessTests: XCTestCase {
|
||||||
|
|
||||||
func testReadOnly() {
|
func testReadOnly() {
|
||||||
|
|
@ -42,3 +42,4 @@ class AccessTests: XCTestCase {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue