DateTimeController: make possible functions const

MonthShortToString and DayOfWeekShortToString don't change the
underlying object. Those are just getters and can be declared `const`.
This commit is contained in:
Reinhold Gschweicher
2022-03-14 20:28:51 +01:00
parent 21da5869c5
commit db41d9081a
2 changed files with 4 additions and 4 deletions

View File

@@ -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)];
}