From b7628c8c65ad1d9e33b684bb6ac59560d76303c2 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 13 Dec 2015 01:01:04 +0100 Subject: [PATCH] Use lightweight generic declarations in ACEView --- AVRsack/ACEViewExt.swift | 4 ++-- AVRsack/ASApplication.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 }