Reorder lookup to avoid building name map when not needed.

This commit is contained in:
Andrew Griffiths 2018-02-06 21:48:06 +11:00 committed by Ben Chatelain
parent c001021f3a
commit f9d5081962

View file

@ -24,10 +24,10 @@ struct UpgradeCommand: CommandProtocol {
let appIds: [UInt64]
appIds = apps.flatMap {
if let appId = softwareMap.appIdWithProductName($0) {
if let appId = UInt64($0) {
return appId
}
if let appId = UInt64($0) {
if let appId = softwareMap.appIdWithProductName($0) {
return appId
}
return nil