diff options
author | JF <JF002@users.noreply.github.com> | 2022-03-14 21:13:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 21:13:56 +0100 |
commit | 76b7436dfb23791c1a9be505a89ddf80c8b583d7 (patch) | |
tree | 7ea5b219cca4a0391780448e090e9169cb75f641 /src/components | |
parent | 21da5869c5e48df666ea9d9c7698f7f69528645e (diff) | |
parent | bebc072e78145af69aacb1c2c9549da8653b7b0c (diff) |
Merge pull request #1039 from NeroBurner/datetime_const_and_analog_const_ref
Datetime const and analog const ref
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/datetime/DateTimeController.cpp | 4 | ||||
-rw-r--r-- | src/components/datetime/DateTimeController.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp index e0d12431..3bfbdc7e 100644 --- a/src/components/datetime/DateTimeController.cpp +++ b/src/components/datetime/DateTimeController.cpp @@ -108,11 +108,11 @@ void DateTime::UpdateTime(uint32_t systickCounter) { } } -const char* DateTime::MonthShortToString() { +const char* DateTime::MonthShortToString() const { return MonthsString[static_cast<uint8_t>(month)]; } -const char* DateTime::DayOfWeekShortToString() { +const char* DateTime::DayOfWeekShortToString() const { return DaysStringShort[static_cast<uint8_t>(dayOfWeek)]; } diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h index 6e5ee3ca..00bbc2ee 100644 --- a/src/components/datetime/DateTimeController.h +++ b/src/components/datetime/DateTimeController.h @@ -61,8 +61,8 @@ namespace Pinetime { return second; } - const char* MonthShortToString(); - const char* DayOfWeekShortToString(); + const char* MonthShortToString() const; + const char* DayOfWeekShortToString() const; static const char* MonthShortToStringLow(Months month); std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const { |