diff --git a/swift/Sources/QRCodeGenerator/QRCode.swift b/swift/Sources/QRCodeGenerator/QRCode.swift index 5d3c07d..9c495d6 100644 --- a/swift/Sources/QRCodeGenerator/QRCode.swift +++ b/swift/Sources/QRCodeGenerator/QRCode.swift @@ -21,7 +21,6 @@ * Software. */ -import BinaryKit import Foundation struct QRCode { @@ -620,7 +619,7 @@ struct QRCode { } /// Returns an entry from the given table based on the given values. - private func table_get(_ table: [[Int]], version: Version, ecl: QrCodeEcc) -> UInt { + private func table_get(_ table: [[Int]], version: QRCodeVersion, ecl: QRCodeECC) -> UInt { UInt(table[ecl.ordinal][Int(version.value)]) } diff --git a/swift/Sources/QRCodeGenerator/QRSegment.swift b/swift/Sources/QRCodeGenerator/QRSegment.swift index f352437..40caf3d 100644 --- a/swift/Sources/QRCodeGenerator/QRSegment.swift +++ b/swift/Sources/QRCodeGenerator/QRSegment.swift @@ -171,7 +171,7 @@ public struct QRSegment: Hashable { /// Calculates and returns the number of bits needed to encode the given /// segments at the given version. The result is None if a segment has too many /// characters to fit its length field, or the total bits exceeds usize::MAX. - public static func getTotalBits(segments: [Self], version: Version) -> UInt? { + public static func getTotalBits(segments: [Self], version: QRCodeVersion) -> UInt? { var result: UInt = 0 for seg in segments { let ccBits = seg.mode.numCharCountBits(version: version) @@ -197,7 +197,7 @@ public struct QRSegment: Hashable { } /*---- QrSegmentMode functionality ----*/ - public struct Mode: Hashable { + public enum Mode: Hashable { case numeric case alphanumeric case byte