Fix some typos in Swift port

pull/82/head
fwcd 6 years ago
parent 3a420a3ad7
commit dac60dacee

@ -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)])
}

@ -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

Loading…
Cancel
Save