Skip to content

Commit 76b7436

Browse files
authored
Merge pull request #1039 from NeroBurner/datetime_const_and_analog_const_ref
Datetime const and analog const ref
2 parents 21da586 + bebc072 commit 76b7436

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/datetime/DateTimeController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
108108
}
109109
}
110110

111-
const char* DateTime::MonthShortToString() {
111+
const char* DateTime::MonthShortToString() const {
112112
return MonthsString[static_cast<uint8_t>(month)];
113113
}
114114

115-
const char* DateTime::DayOfWeekShortToString() {
115+
const char* DateTime::DayOfWeekShortToString() const {
116116
return DaysStringShort[static_cast<uint8_t>(dayOfWeek)];
117117
}
118118

src/components/datetime/DateTimeController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ namespace Pinetime {
6161
return second;
6262
}
6363

64-
const char* MonthShortToString();
65-
const char* DayOfWeekShortToString();
64+
const char* MonthShortToString() const;
65+
const char* DayOfWeekShortToString() const;
6666
static const char* MonthShortToStringLow(Months month);
6767

6868
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const {

src/displayapp/screens/WatchFaceAnalog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace Pinetime {
7474
lv_obj_t* batteryIcon;
7575
lv_obj_t* notificationIcon;
7676

77-
Controllers::DateTime& dateTimeController;
77+
const Controllers::DateTime& dateTimeController;
7878
Controllers::Battery& batteryController;
7979
Controllers::Ble& bleController;
8080
Controllers::NotificationManager& notificationManager;

0 commit comments

Comments
 (0)