From 9252a0b76e699aed798f54693052e006b2469ac2 Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Thu, 1 Aug 2019 07:10:22 +0200 Subject: [PATCH] Upate license --- .swiftlint.yml | 2 +- LICENSE | 2 +- Sources/FirebladeECS/Component+Access.swift | 8 ++++---- Tests/FirebladeECSTests/AccessTests.swift | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 0b91689..36c9a4e 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -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 diff --git a/LICENSE b/LICENSE index e3d552f..15bc1ce 100644 --- a/LICENSE +++ b/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 diff --git a/Sources/FirebladeECS/Component+Access.swift b/Sources/FirebladeECS/Component+Access.swift index b76c8cc..054fd25 100644 --- a/Sources/FirebladeECS/Component+Access.swift +++ b/Sources/FirebladeECS/Component+Access.swift @@ -8,11 +8,11 @@ @dynamicMemberLookup public struct ReadableOnly where Comp: Component { @usableFromInline let component: Comp - + public init(_ component: Comp) { self.component = component } - + @inlinable public subscript(dynamicMember keyPath: KeyPath) -> C { return component[keyPath: keyPath] } @@ -21,11 +21,11 @@ public struct ReadableOnly where Comp: Component { @dynamicMemberLookup public struct Writable where Comp: Component { @usableFromInline let component: Comp - + public init(_ component: Comp) { self.component = component } - + @inlinable public subscript(dynamicMember keyPath: ReferenceWritableKeyPath) -> C { nonmutating get { return component[keyPath: keyPath] } nonmutating set { component[keyPath: keyPath] = newValue } diff --git a/Tests/FirebladeECSTests/AccessTests.swift b/Tests/FirebladeECSTests/AccessTests.swift index 24b89db..423ceb8 100644 --- a/Tests/FirebladeECSTests/AccessTests.swift +++ b/Tests/FirebladeECSTests/AccessTests.swift @@ -10,6 +10,7 @@ import FirebladeECS import XCTest + class AccessTests: XCTestCase { func testReadOnly() {