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
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ void AlarmController::ScheduleAlarm() {
|
|||
state = AlarmState::Set;
|
||||
}
|
||||
|
||||
uint32_t AlarmController::SecondsToAlarm() {
|
||||
uint32_t AlarmController::SecondsToAlarm() const {
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(alarmTime - dateTimeController.CurrentDateTime()).count();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Pinetime {
|
|||
void ScheduleAlarm();
|
||||
void DisableAlarm();
|
||||
void SetOffAlarmNow();
|
||||
uint32_t SecondsToAlarm();
|
||||
uint32_t SecondsToAlarm() const;
|
||||
void StopAlerting();
|
||||
enum class AlarmState { Not_Set, Set, Alerting };
|
||||
enum class RecurType { None, Daily, Weekdays };
|
||||
|
|
Loading…
Reference in a new issue