From b7eb5403ffb5069aaa784e125e8093e3006fe986 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Sat, 26 Jul 2014 11:03:18 -0600 Subject: [PATCH] =?UTF-8?q?Replace=20typedef=20enums=20with=20typedef=20NS?= =?UTF-8?q?=5FENUM.=20For=20one=20thing,=20it=20make=20Swift=20happier.=20?= =?UTF-8?q?Also,=20we=20don=E2=80=99t=20have=20to=20worry=20about=20what?= =?UTF-8?q?=20size/type=20the=20value=20is.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sparkle/SUAutomaticUpdateAlert.h | 5 ++--- Sparkle/SUStandardVersionComparator.m | 4 ++-- Sparkle/SUUpdateAlert.h | 5 ++--- Sparkle/SUUpdatePermissionPrompt.h | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Sparkle/SUAutomaticUpdateAlert.h b/Sparkle/SUAutomaticUpdateAlert.h index 7ac9b46d..a3f9aa30 100644 --- a/Sparkle/SUAutomaticUpdateAlert.h +++ b/Sparkle/SUAutomaticUpdateAlert.h @@ -13,12 +13,11 @@ @protocol SUAutomaticUpdateAlertDelegate; -typedef enum -{ +typedef NS_ENUM(int, SUAutomaticInstallationChoice) { SUInstallNowChoice, SUInstallLaterChoice, SUDoNotInstallChoice -} SUAutomaticInstallationChoice; +}; @class SUAppcastItem, SUHost; @interface SUAutomaticUpdateAlert : SUWindowController diff --git a/Sparkle/SUStandardVersionComparator.m b/Sparkle/SUStandardVersionComparator.m index bb9eab5a..7bd8599c 100644 --- a/Sparkle/SUStandardVersionComparator.m +++ b/Sparkle/SUStandardVersionComparator.m @@ -24,11 +24,11 @@ return defaultComparator; } -typedef enum { +typedef NS_ENUM(char, SUCharacterType) { kNumberType, kStringType, kSeparatorType, -} SUCharacterType; +}; - (SUCharacterType)typeOfCharacter:(NSString *)character { diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index d1d07d5e..36b178f6 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -14,13 +14,12 @@ @protocol SUUpdateAlertDelegate; -typedef enum -{ +typedef NS_ENUM(int, SUUpdateAlertChoice) { SUInstallUpdateChoice, SURemindMeLaterChoice, SUSkipThisVersionChoice, SUOpenInfoURLChoice -} SUUpdateAlertChoice; +}; @class WebView, SUAppcastItem, SUHost; @interface SUUpdateAlert : SUWindowController diff --git a/Sparkle/SUUpdatePermissionPrompt.h b/Sparkle/SUUpdatePermissionPrompt.h index cadff1bc..8e116b5d 100644 --- a/Sparkle/SUUpdatePermissionPrompt.h +++ b/Sparkle/SUUpdatePermissionPrompt.h @@ -11,10 +11,10 @@ #import "SUWindowController.h" -typedef enum { +typedef NS_ENUM(int, SUPermissionPromptResult) { SUAutomaticallyCheck, SUDoNotAutomaticallyCheck -} SUPermissionPromptResult; +}; @protocol SUUpdatePermissionPromptDelegate;