From d4ffbaa778173fb0970fad3f9f6333b1845851aa Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sat, 5 Dec 2020 18:54:22 -0600 Subject: [PATCH] Linter errors. --- Clocker/Overall App/Themer.swift | 2 +- Clocker/Overall App/VersionUpdateHandler.swift | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Clocker/Overall App/Themer.swift b/Clocker/Overall App/Themer.swift index 99bf974..e141317 100644 --- a/Clocker/Overall App/Themer.swift +++ b/Clocker/Overall App/Themer.swift @@ -446,7 +446,7 @@ extension Themer { } func symbolImage(for name: String) -> NSImage? { - assert(name.count > 0) + assert(name.isEmpty == false) if #available(OSX 11.0, *) { return NSImage(systemSymbolName: name, diff --git a/Clocker/Overall App/VersionUpdateHandler.swift b/Clocker/Overall App/VersionUpdateHandler.swift index ba28cbe..4cb3bc5 100644 --- a/Clocker/Overall App/VersionUpdateHandler.swift +++ b/Clocker/Overall App/VersionUpdateHandler.swift @@ -45,7 +45,7 @@ class VersionUpdateHandler: NSObject { appStoreCountry = Locale.current.regionCode if appStoreCountry == "150" { appStoreCountry = "eu" - } else if appStoreCountry.replacingOccurrences(of: "[A-Za-z]{2}", with: "", options: .regularExpression, range: appStoreCountry.startIndex ..< appStoreCountry.endIndex).count > 0 { + } else if appStoreCountry.replacingOccurrences(of: "[A-Za-z]{2}", with: "", options: .regularExpression, range: appStoreCountry.startIndex ..< appStoreCountry.endIndex).isEmpty == false { appStoreCountry = "us" } @@ -91,7 +91,7 @@ class VersionUpdateHandler: NSObject { } private func updatedURL() -> URL { - if updateURL.absoluteString.count > 0 { + if updateURL.absoluteString.isEmpty == false { return updateURL } @@ -257,11 +257,11 @@ class VersionUpdateHandler: NSObject { scrollView.frame = NSMakeRect(0.0, 0.0, scrollView.frame.size.width, height) alert.accessoryView = scrollView - if ignoreButton.count > 0 { + if ignoreButton.isEmpty == false { alert.addButton(withTitle: ignoreButton) } - if remindButton.count > 0 { + if remindButton.isEmpty == false { alert.addButton(withTitle: remindButton) let modalResponse = alert.runModal() @@ -309,7 +309,7 @@ class VersionUpdateHandler: NSObject { if checkingForNewVersion { checkingForNewVersion = false - if remoteVersionsDict.count <= 0 { + if remoteVersionsDict.isEmpty { if downloadError != nil { Logger.info("Update Check Failed because of \(downloadError!.localizedDescription)") } else { @@ -347,7 +347,7 @@ class VersionUpdateHandler: NSObject { } let lastVersionString = lastVersion() - if lastVersionString.count > 0 || showOnFirstLaunch || previewMode { + if lastVersionString.isEmpty == false || showOnFirstLaunch || previewMode { if applicationVersion.compareVersion(lastVersionString) == ComparisonResult.orderedDescending || previewMode { // Clear Reminder setLastReminded(nil)