Skip to content

Commit

Permalink
Merge pull request #1842 from wallisch/CATTY-730
Browse files Browse the repository at this point in the history
CATTY-730 Fix new Swiftlint warnings
  • Loading branch information
wallisch authored Oct 14, 2024
2 parents 72f2f2e + 5c53951 commit 7d9a52c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ open class ArduinoHelper {
var analogPin4 = 0
var analogPin5 = 0

var digitalValues: [Int] = [Int](repeating: 0, count: 21)
var digitalValues = [Int](repeating: 0, count: 21)

var portValues = Array(repeating: Array(repeating: 0, count: 8), count: 3)
//Helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ import UIKit

open var peripherals: [Peripheral] {

let values: [Peripheral] = [Peripheral](self.ownPeripherals.values)
let values = [Peripheral](self.ownPeripherals.values)
return values
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private func > <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
}

open var services: [Service] {
let values: [Service] = [Service](self.ownServices.values)
let values = [Service](self.ownServices.values)
return values
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class Service: ServiceWrapper {

// MARK: getter
public var characteristics: [Characteristic] {
let values: [Characteristic] = [Characteristic](self.ownCharacteristics.values)
let values = [Characteristic](self.ownCharacteristics.values)
return values
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,9 +920,10 @@ open class StreamPromise<T> {
// FutureStream
open class FutureStream<T> {

private var futures = [Future<T>]()
private typealias InFuture = (Future<T>) -> Void
private var saveCompletes = [InFuture]()

private var saveCompletes = [InFuture]()
private var futures = [Future<T>]()
private var capacity: Int?

internal let defaultExecutionContext: ExecutionContext = QueueContext.main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ open class ProfileManager {

// PUBLIC
open var services: [ServiceProfile] {
let values: [ServiceProfile] = [ServiceProfile](self.serviceProfiles.values)
let values = [ServiceProfile](self.serviceProfiles.values)
return values
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ open class ServiceProfile {
public let tag: String

open var characteristics: [CharacteristicProfile] {
let values: [CharacteristicProfile] = [CharacteristicProfile](self.characteristicProfiles.values)
let values = [CharacteristicProfile](self.characteristicProfiles.values)
return values
}

Expand Down
2 changes: 1 addition & 1 deletion src/Catty/DataStructures/3rdParty/Stack/CBStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CBStack<T> {
return
} else {
//establish the new item instance
let childToUse: LLNode<T> = LLNode<T>()
let childToUse = LLNode<T>()
childToUse.key = key

//set newly created item at the top
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FirmataDelegateMock: FirmataDelegate {
var receivedString: String = ""
var receivedPin: Int = 0
var receivedPort: Int = 0
var receivedPortData: [Int] = [Int](repeating: 0, count: 1)
var receivedPortData = [Int](repeating: 0, count: 1)
var receivedValue: Int = 0
var analogMapping = NSMutableDictionary()
var capabilityQuery = [[Int: Int]]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import XCTest

class ObjectRecognitionFunctionsTest: XCTestCase {
private enum SensorType { case x, y, width, height }

var idOfDetectedObjectFunction: IDOfDetectedObjectFunction!
var objectWithIDVisibleFunction: ObjectWithIDVisibleFunction!
var labelOfObjectWithIDFunction: LabelOfObjectWithIDFunction!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import XCTest

class TextBlockPositionFunctionTest: XCTestCase {
private enum SensorType { case x, y, size }

var textBlockXFunction: TextBlockXFunction!
var textBlockYFunction: TextBlockYFunction!
var textBlockSizeFunction: TextBlockSizeFunction!
Expand Down

0 comments on commit 7d9a52c

Please sign in to comment.