X-Git-Url: https://git.r.bdr.sh/rbdr/captura/blobdiff_plain/5802c153cae64142d84e3cd5f762939501ee7e53..505c1e620497828ffb914e05dd76d9ab124f144a:/Captura/Data/OutputFormatSetting.swift?ds=inline diff --git a/Captura/Data/OutputFormatSetting.swift b/Captura/Data/OutputFormatSetting.swift index fd48f2f..2131caa 100644 --- a/Captura/Data/OutputFormatSetting.swift +++ b/Captura/Data/OutputFormatSetting.swift @@ -20,9 +20,9 @@ enum OutputFormatSetting: Int { case gifOnly = 0 case mp4Only = 1 case all = 2 - + init?(_ string: String) { - switch(string) { + switch string { case "gif": self = .gifOnly case "mp4": @@ -33,17 +33,17 @@ enum OutputFormatSetting: Int { return nil } } - + func shouldSaveGif() -> Bool { return self == .gifOnly || self == .all } - + func shouldSaveMp4() -> Bool { return self == .mp4Only || self == .all } - + func toString() -> String { - switch(self) { + switch self { case .gifOnly: return "gif" case .mp4Only: