From f7c87a700d2d9cd05469f1b5b2966a01808ce0e1 Mon Sep 17 00:00:00 2001 From: FintasticMan Date: Wed, 9 Oct 2024 12:04:53 +0200 Subject: weather: Switch to std::optional for Forecast days Also only iterate over the number of days actually in use, rather than MaxNbForecastDays. --- src/components/ble/SimpleWeatherService.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/ble/SimpleWeatherService.h') diff --git a/src/components/ble/SimpleWeatherService.h b/src/components/ble/SimpleWeatherService.h index 36bbea48..0f8c181b 100644 --- a/src/components/ble/SimpleWeatherService.h +++ b/src/components/ble/SimpleWeatherService.h @@ -63,7 +63,7 @@ namespace Pinetime { class Temperature { public: - explicit Temperature(int16_t raw = 0) : raw {raw} { + explicit Temperature(int16_t raw) : raw {raw} { } [[nodiscard]] int16_t PreciseCelsius() const { @@ -129,7 +129,7 @@ namespace Pinetime { bool operator==(const Day& other) const; }; - std::array days; + std::array, MaxNbForecastDays> days; bool operator==(const Forecast& other) const; }; -- cgit v1.2.3-70-g09d2