Skip to content

Commit

Permalink
coder inits required
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonm23 committed Oct 9, 2023
1 parent fa26662 commit e03063d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/Magnet/KeyCombo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ open class KeyCombo: NSObject, NSCopying, NSCoding, Codable {
}

// MARK: - NSCoding
public init?(coder aDecoder: NSCoder) {
public required init?(coder aDecoder: NSCoder) {
self.doubledModifiers = aDecoder.decodeBool(forKey: CodingKeys.doubledModifiers.rawValue)
self.modifiers = aDecoder.decodeInteger(forKey: CodingKeys.modifiers.rawValue)
guard !doubledModifiers else {
Expand Down Expand Up @@ -124,7 +124,7 @@ open class KeyCombo: NSObject, NSCopying, NSCoding, Codable {
}

// MARK: - Codable
public init(from decoder: Decoder) throws {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.doubledModifiers = try container.decode(Bool.self, forKey: .doubledModifiers)
self.modifiers = try container.decode(Int.self, forKey: .modifiers)
Expand Down

0 comments on commit e03063d

Please sign in to comment.