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