WeatherService: const DateTimeController reference
This commit is contained in:
parent
829ab86f37
commit
0a4f015783
|
@ -26,7 +26,7 @@ int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble
|
||||||
|
|
||||||
namespace Pinetime {
|
namespace Pinetime {
|
||||||
namespace Controllers {
|
namespace Controllers {
|
||||||
WeatherService::WeatherService(DateTime& dateTimeController) : dateTimeController(dateTimeController) {
|
WeatherService::WeatherService(const DateTime& dateTimeController) : dateTimeController(dateTimeController) {
|
||||||
nullHeader = &nullTimelineheader;
|
nullHeader = &nullTimelineheader;
|
||||||
nullTimelineheader->timestamp = 0;
|
nullTimelineheader->timestamp = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WeatherService {
|
class WeatherService {
|
||||||
public:
|
public:
|
||||||
explicit WeatherService(DateTime& dateTimeController);
|
explicit WeatherService(const DateTime& dateTimeController);
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
uint16_t eventHandle {};
|
uint16_t eventHandle {};
|
||||||
|
|
||||||
Pinetime::Controllers::DateTime& dateTimeController;
|
const Pinetime::Controllers::DateTime& dateTimeController;
|
||||||
|
|
||||||
std::vector<std::unique_ptr<WeatherData::TimelineHeader>> timeline;
|
std::vector<std::unique_ptr<WeatherData::TimelineHeader>> timeline;
|
||||||
std::unique_ptr<WeatherData::TimelineHeader> nullTimelineheader = std::make_unique<WeatherData::TimelineHeader>();
|
std::unique_ptr<WeatherData::TimelineHeader> nullTimelineheader = std::make_unique<WeatherData::TimelineHeader>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user