Skip to content

Commit 8b785d8

Browse files
committed
Lint
1 parent e1091c6 commit 8b785d8

File tree

9 files changed

+17
-23
lines changed

9 files changed

+17
-23
lines changed

Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,14 @@ let renderingAPIDefines: [SwiftSetting] = {
8282
return swiftSettings
8383
}()
8484

85-
8685
let swiftSettings: [SwiftSetting] = renderingAPIDefines + platformDefines
8786

88-
8987
let package = Package(
9088
name: "FirebladePAL",
9189
platforms: [
9290
.macOS(.v11),
9391
.iOS(.v13),
94-
.tvOS(.v13),
92+
.tvOS(.v13)
9593
],
9694
products: [
9795
.library(

Sources/FirebladePAL/Keys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ extension KeyModifier: CustomDebugStringConvertible {
319319
.metaRight: "metaRight",
320320
.alternateGraphic: "alternateGraphic",
321321
.capsLock: "capsLock",
322-
.numLock: "numLock",
322+
.numLock: "numLock"
323323
]
324324

325325
public var debugDescription: String {

Sources/FirebladePAL/Platform.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public enum Platform {
4949
#if FRB_PLATFORM_APPL
5050
case .apple:
5151
break
52-
// APPLPlatform.initialize()
52+
// APPLPlatform.initialize()
5353
#endif
5454
}
5555
}
@@ -64,7 +64,7 @@ public enum Platform {
6464
#if FRB_PLATFORM_APPL
6565
case .apple:
6666
break
67-
// APPLPlatform.quit()
67+
// APPLPlatform.quit()
6868
#endif
6969
}
7070
}

Sources/FirebladePAL/Platform/Apple/APPLDisplayLink.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ final class APPLDisplayLinkMacOS {
113113
_: UnsafePointer<CVTimeStamp>, // A pointer to the time that the frame will be displayed.
114114
_: CVOptionFlags, // Currently unused. Pass 0.
115115
_: UnsafeMutablePointer<CVOptionFlags>, // Currently unused. Pass 0.
116-
_ displayLinkContext: UnsafeMutableRawPointer?) -> CVReturn
117-
{
116+
_ displayLinkContext: UnsafeMutableRawPointer?) -> CVReturn {
118117
guard let context = displayLinkContext else {
119118
assertionFailure("Display link context not set.")
120119
return kCVReturnError

Sources/FirebladePAL/Platform/Apple/APPLView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class APPLView: _APPLView {
3333

3434
/*
3535
override func makeBackingLayer() -> CALayer {
36-
CAMetalLayer.init()
36+
CAMetalLayer.init()
3737
}
38-
*/
38+
*/
3939

4040
required init?(coder _: NSCoder) { nil }
4141

Sources/FirebladePAL/Platform/Apple/APPLWindow.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ final class APPLWindow: NSObject, WindowBase {
3030
init(manager: APPLWindowManager,
3131
viewController: APPLViewController,
3232
properties _: WindowProperties,
33-
nativeWindow: _APPLWindow? = nil)
34-
{
33+
nativeWindow: _APPLWindow? = nil) {
3534
self.manager = manager
3635
self._viewController = viewController
3736
#if FRB_PLATFORM_APPL_MACOS

Sources/FirebladePAL/Platform/SDL/SDLEvents.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ final class SDLEvents: PlatformEvents {
535535
SDLK_w: .W,
536536
SDLK_x: .X,
537537
SDLK_y: .Y,
538-
SDLK_z: .Z,
538+
SDLK_z: .Z
539539
]
540540

541541
private static let physicalKeyMap: [SDL_Scancode: KeyCode] = [
@@ -780,15 +780,15 @@ final class SDLEvents: PlatformEvents {
780780
SDL_SCANCODE_WWW: .WWW,
781781
SDL_SCANCODE_X: .X,
782782
SDL_SCANCODE_Y: .Y,
783-
SDL_SCANCODE_Z: .Z,
783+
SDL_SCANCODE_Z: .Z
784784
]
785785

786786
static let pointerButtonMap: [Int32: PointerButton] = [
787787
SDL_BUTTON_LEFT: .left,
788788
SDL_BUTTON_MIDDLE: .middle,
789789
SDL_BUTTON_RIGHT: .right,
790790
SDL_BUTTON_X1: .other(4), // extra button 1 is mouse button 4
791-
SDL_BUTTON_X2: .other(5), // extra button 2 is mouse button 5
791+
SDL_BUTTON_X2: .other(5) // extra button 2 is mouse button 5
792792
]
793793
}
794794

Sources/FirebladePAL/Platform/SDL/Surface/SDLVLKWindowSurface.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ open class SDLVLKWindowSurface: SDLWindowSurface, VLKWindowSurfaceBase {
9191

9292
open class func createInstance(layers enabledLayerNames: [String] = [],
9393
extensions enabledExtensionNames: [String] = []) throws -> VkInstance {
94-
94+
9595
#if DEBUG
9696
let enabledLayerNames = Set(enabledLayerNames) + ["VK_LAYER_KHRONOS_validation"]
9797
#endif
@@ -128,8 +128,7 @@ open class SDLVLKWindowSurface: SDLWindowSurface, VLKWindowSurfaceBase {
128128

129129
extension Array where Element == String {
130130
fileprivate init<I: FixedWidthInteger>(unsafeUninitializedCapacity count: I,
131-
initializingWith closure: (_ buffer: UnsafeMutablePointer<UnsafePointer<CChar>?>, _ written: inout Int) throws -> Void) rethrows
132-
{
131+
initializingWith closure: (_ buffer: UnsafeMutablePointer<UnsafePointer<CChar>?>, _ written: inout Int) throws -> Void) rethrows {
133132
let buffer = UnsafeMutablePointer<UnsafePointer<CChar>?>.allocate(capacity: Int(count))
134133
defer {
135134
buffer.deallocate()
@@ -155,8 +154,7 @@ extension Array where Element == String {
155154
func translate(_ slice: inout Self.SubSequence,
156155
_ offset: inout Int,
157156
_ buffer: UnsafeMutableBufferPointer<UnsafePointer<CChar>?>,
158-
_ body: (UnsafeBufferPointer<UnsafePointer<CChar>?>) throws -> R) rethrows -> R
159-
{
157+
_ body: (UnsafeBufferPointer<UnsafePointer<CChar>?>) throws -> R) rethrows -> R {
160158
guard let string = slice.popFirst() else {
161159
return try body(UnsafeBufferPointer(buffer))
162160
}

Tests/FirebladePALTests/FirebladePALTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import XCTest
1111
final class FirebladePALTests: XCTestCase {
1212
func testPlatformSetup() throws {
1313
Platform.initialize()
14-
14+
1515
#if FRB_ENABLE_PLATFORM_SDL
1616
XCTAssertEqual(Platform.implementation, .sdl)
1717
#endif
18-
18+
1919
#if FRB_ENABLE_PLATFORM_APPL
2020
XCTAssertEqual(Platform.implementation, .apple)
2121
#endif
22-
22+
2323
Platform.quit()
2424
}
2525
}

0 commit comments

Comments
 (0)