diff options
| author | ivar <i@oiee.no> | 2026-03-24 13:47:46 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-03-24 13:47:46 +0100 |
| commit | 7328b2e18121d3047ac142eaf0c8b048933d17dc (patch) | |
| tree | 0f3c185941195ed2b49238227f784772565dbf12 /Solverv | |
| parent | 9c7074e3bec7059d540c28964d5982f855ca6065 (diff) | |
| download | solverv-7328b2e18121d3047ac142eaf0c8b048933d17dc.tar.xz solverv-7328b2e18121d3047ac142eaf0c8b048933d17dc.zip | |
fix: resolve compiler warnings about unused variable mutations
Changed var to let for baseComponents and utcComponents
that are never mutated after initialization.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'Solverv')
| -rw-r--r-- | Solverv/Models/SolsticeEvent.swift | 2 | ||||
| -rw-r--r-- | Solverv/Utilities/SunTimes.swift | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Solverv/Models/SolsticeEvent.swift b/Solverv/Models/SolsticeEvent.swift index 46c14ac..d8c4a7b 100644 --- a/Solverv/Models/SolsticeEvent.swift +++ b/Solverv/Models/SolsticeEvent.swift @@ -16,7 +16,7 @@ struct SolsticeEvent: Identifiable, Codable { /// Convert UTC date to user's local timezone func localDateTime() -> Date { let utcCalendar = Calendar(identifier: .gregorian) - var utcComponents = utcCalendar.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) + let utcComponents = utcCalendar.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) let timeZone = TimeZone.current let offset = timeZone.secondsFromGMT(for: date) diff --git a/Solverv/Utilities/SunTimes.swift b/Solverv/Utilities/SunTimes.swift index f8906ce..3b8f049 100644 --- a/Solverv/Utilities/SunTimes.swift +++ b/Solverv/Utilities/SunTimes.swift @@ -74,7 +74,7 @@ class SunTimes { // Step 9: Create date components, handling day boundary crossing let calendar2 = Calendar.current - var baseComponents = calendar2.dateComponents([.year, .month, .day], from: date) + let baseComponents = calendar2.dateComponents([.year, .month, .day], from: date) // Sunrise var sunriseComp = baseComponents |
