Upate license
This commit is contained in:
parent
181d8cac51
commit
9252a0b76e
|
|
@ -90,7 +90,7 @@ opt_in_rules:
|
||||||
- unneeded_parentheses_in_closure_argument
|
- unneeded_parentheses_in_closure_argument
|
||||||
- untyped_error_in_catch
|
- untyped_error_in_catch
|
||||||
- unused_import
|
- unused_import
|
||||||
- unused_private_declaration
|
#- unused_private_declaration
|
||||||
- vertical_parameter_alignment_on_call
|
- vertical_parameter_alignment_on_call
|
||||||
- vertical_whitespace_between_cases
|
- vertical_whitespace_between_cases
|
||||||
- vertical_whitespace_closing_braces
|
- vertical_whitespace_closing_braces
|
||||||
|
|
|
||||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 Christian Treffs
|
Copyright (c) 2017-19 Christian Treffs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@
|
||||||
@dynamicMemberLookup
|
@dynamicMemberLookup
|
||||||
public struct ReadableOnly<Comp> where Comp: Component {
|
public struct ReadableOnly<Comp> where Comp: Component {
|
||||||
@usableFromInline let component: Comp
|
@usableFromInline let component: Comp
|
||||||
|
|
||||||
public init(_ component: Comp) {
|
public init(_ component: Comp) {
|
||||||
self.component = component
|
self.component = component
|
||||||
}
|
}
|
||||||
|
|
||||||
@inlinable public subscript<C>(dynamicMember keyPath: KeyPath<Comp, C>) -> C {
|
@inlinable public subscript<C>(dynamicMember keyPath: KeyPath<Comp, C>) -> C {
|
||||||
return component[keyPath: keyPath]
|
return component[keyPath: keyPath]
|
||||||
}
|
}
|
||||||
|
|
@ -21,11 +21,11 @@ public struct ReadableOnly<Comp> where Comp: Component {
|
||||||
@dynamicMemberLookup
|
@dynamicMemberLookup
|
||||||
public struct Writable<Comp> where Comp: Component {
|
public struct Writable<Comp> where Comp: Component {
|
||||||
@usableFromInline let component: Comp
|
@usableFromInline let component: Comp
|
||||||
|
|
||||||
public init(_ component: Comp) {
|
public init(_ component: Comp) {
|
||||||
self.component = component
|
self.component = component
|
||||||
}
|
}
|
||||||
|
|
||||||
@inlinable public subscript<C>(dynamicMember keyPath: ReferenceWritableKeyPath<Comp, C>) -> C {
|
@inlinable public subscript<C>(dynamicMember keyPath: ReferenceWritableKeyPath<Comp, C>) -> C {
|
||||||
nonmutating get { return component[keyPath: keyPath] }
|
nonmutating get { return component[keyPath: keyPath] }
|
||||||
nonmutating set { component[keyPath: keyPath] = newValue }
|
nonmutating set { component[keyPath: keyPath] = newValue }
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
import FirebladeECS
|
import FirebladeECS
|
||||||
import XCTest
|
import XCTest
|
||||||
|
|
||||||
|
|
||||||
class AccessTests: XCTestCase {
|
class AccessTests: XCTestCase {
|
||||||
|
|
||||||
func testReadOnly() {
|
func testReadOnly() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue