diff --git a/AVRsack/ACEViewExt.swift b/AVRsack/ACEViewExt.swift index 807b133..045e61a 100644 --- a/AVRsack/ACEViewExt.swift +++ b/AVRsack/ACEViewExt.swift @@ -10,7 +10,7 @@ import Foundation extension ACEView { class func themeIdByName(themeName: String) -> ACETheme? { - for (themeIdx, theme) in (ACEThemeNames.themeNames() as! [String]).enumerate() { + for (themeIdx, theme) in ACEThemeNames.themeNames() .enumerate() { if themeName == theme { return ACETheme(rawValue: UInt(themeIdx)) } @@ -19,7 +19,7 @@ extension ACEView { } class func handlerIdByName(handlerName: String) -> ACEKeyboardHandler? { - for (handlerIdx, handler) in (ACEKeyboardHandlerNames.humanKeyboardHandlerNames() as! [String]).enumerate() { + for (handlerIdx, handler) in ACEKeyboardHandlerNames.humanKeyboardHandlerNames().enumerate() { if handlerName == handler { return ACEKeyboardHandler(rawValue: UInt(handlerIdx))! } diff --git a/AVRsack/ASApplication.swift b/AVRsack/ASApplication.swift index 40948b9..dd51965 100644 --- a/AVRsack/ASApplication.swift +++ b/AVRsack/ASApplication.swift @@ -52,12 +52,12 @@ class ASApplication: NSObject, NSApplicationDelegate, NSMenuDelegate { } func applicationDidFinishLaunching(aNotification: NSNotification) { themeMenu.removeAllItems() - for (index, theme) in (ACEThemeNames.humanThemeNames() as! [String]).enumerate() { + for (index, theme) in ACEThemeNames.humanThemeNames().enumerate() { let menuItem = themeMenu.addItemWithTitle(theme, action: "changeTheme:", keyEquivalent: "")! menuItem.tag = index } keyboardMenu.removeAllItems() - for (index, theme) in (ACEKeyboardHandlerNames.humanKeyboardHandlerNames() as! [String]).enumerate() { + for (index, theme) in ACEKeyboardHandlerNames.humanKeyboardHandlerNames().enumerate() { let menuItem = keyboardMenu.addItemWithTitle(theme, action: "changeKeyboardHandler:", keyEquivalent: "")! menuItem.tag = index }