AlarmController: add const to SecondsToAlarm() function
The function `SecondsToAlarm()` doesn't change anything in the `AlarmController` object. Mark the function `const` to show this property.
This commit is contained in:
parent
30e8353a4f
commit
f699261ca3
|
@ -82,7 +82,7 @@ void AlarmController::ScheduleAlarm() {
|
||||||
state = AlarmState::Set;
|
state = AlarmState::Set;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t AlarmController::SecondsToAlarm() {
|
uint32_t AlarmController::SecondsToAlarm() const {
|
||||||
return std::chrono::duration_cast<std::chrono::seconds>(alarmTime - dateTimeController.CurrentDateTime()).count();
|
return std::chrono::duration_cast<std::chrono::seconds>(alarmTime - dateTimeController.CurrentDateTime()).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace Pinetime {
|
||||||
void ScheduleAlarm();
|
void ScheduleAlarm();
|
||||||
void DisableAlarm();
|
void DisableAlarm();
|
||||||
void SetOffAlarmNow();
|
void SetOffAlarmNow();
|
||||||
uint32_t SecondsToAlarm();
|
uint32_t SecondsToAlarm() const;
|
||||||
void StopAlerting();
|
void StopAlerting();
|
||||||
enum class AlarmState { Not_Set, Set, Alerting };
|
enum class AlarmState { Not_Set, Set, Alerting };
|
||||||
enum class RecurType { None, Daily, Weekdays };
|
enum class RecurType { None, Daily, Weekdays };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user