diff --git a/Modules/CPU/readers.swift b/Modules/CPU/readers.swift index e2809418..363beaa3 100644 --- a/Modules/CPU/readers.swift +++ b/Modules/CPU/readers.swift @@ -70,7 +70,7 @@ internal class LoadReader: Reader { } self.CPUUsageLock.unlock() - let showHyperthratedCores = Store.shared.bool(key: "CPU_hyperhreading", defaultValue: false) + let showHyperthratedCores = Store.shared.bool(key: "CPU_hyperhreading", defaultValue: false) if showHyperthratedCores || !self.hasHyperthreadingCores { self.response.usagePerCore = self.usagePerCore } else { @@ -355,13 +355,15 @@ public class FrequencyReader: Reader<[Double]> { private func calculateFrequencies(dict: CFDictionary, freqs: [Int32]) -> Double { let items = self.getResidencies(dict: dict) - let offset = items.firstIndex { $0.0 != "IDLE" && $0.0 != "DOWN" && $0.0 != "OFF" }! + guard let offset = items.firstIndex(where: { $0.0 != "IDLE" && $0.0 != "DOWN" && $0.0 != "OFF" }) else { return 0 } let usage = items.dropFirst(offset).reduce(0.0) { $0 + Double($1.f) } let count = freqs.count var avgFreq: Double = 0 for i in 0..CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 657 + 659 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType diff --git a/Widgets/Supporting Files/Info.plist b/Widgets/Supporting Files/Info.plist index da57a5a4..1f44c098 100644 --- a/Widgets/Supporting Files/Info.plist +++ b/Widgets/Supporting Files/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 2.11.24 CFBundleVersion - 657 + 659 NSExtension NSExtensionPointIdentifier