From b6807ee3ca40b19f89369cf159d1794153268b0c Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 24 Apr 2022 12:38:09 +0300 Subject: [PATCH] Make functions const again --- src/components/ble/MusicService.cpp | 2 +- src/components/ble/MusicService.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp index 83b26a78..60747e91 100644 --- a/src/components/ble/MusicService.cpp +++ b/src/components/ble/MusicService.cpp @@ -199,7 +199,7 @@ float Pinetime::Controllers::MusicService::getPlaybackSpeed() const { return playbackSpeed; } -int Pinetime::Controllers::MusicService::getProgress() { +int Pinetime::Controllers::MusicService::getProgress() const { if (isPlaying()) { return trackProgress + static_cast((static_cast(xTaskGetTickCount() - trackProgressUpdateTime) / 1024.0f) * getPlaybackSpeed()); } diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h index 6c1a6edb..047d0d26 100644 --- a/src/components/ble/MusicService.h +++ b/src/components/ble/MusicService.h @@ -47,7 +47,7 @@ namespace Pinetime { std::string getAlbum() const; - int getProgress(); + int getProgress() const; int getTrackLength() const;