Skip to content

Commit 0a4f015

Browse files
committedMar 19, 2023
WeatherService: const DateTimeController reference
1 parent 829ab86 commit 0a4f015

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/components/ble/weather/WeatherService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble
2626

2727
namespace Pinetime {
2828
namespace Controllers {
29-
WeatherService::WeatherService(DateTime& dateTimeController) : dateTimeController(dateTimeController) {
29+
WeatherService::WeatherService(const DateTime& dateTimeController) : dateTimeController(dateTimeController) {
3030
nullHeader = &nullTimelineheader;
3131
nullTimelineheader->timestamp = 0;
3232
}

‎src/components/ble/weather/WeatherService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace Pinetime {
4040

4141
class WeatherService {
4242
public:
43-
explicit WeatherService(DateTime& dateTimeController);
43+
explicit WeatherService(const DateTime& dateTimeController);
4444

4545
void Init();
4646

@@ -129,7 +129,7 @@ namespace Pinetime {
129129

130130
uint16_t eventHandle {};
131131

132-
Pinetime::Controllers::DateTime& dateTimeController;
132+
const Pinetime::Controllers::DateTime& dateTimeController;
133133

134134
std::vector<std::unique_ptr<WeatherData::TimelineHeader>> timeline;
135135
std::unique_ptr<WeatherData::TimelineHeader> nullTimelineheader = std::make_unique<WeatherData::TimelineHeader>();

0 commit comments

Comments
 (0)
Please sign in to comment.