From 335b1c1c75f54abf43055ca626bb819378ac9b49 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Mon, 22 Jun 2015 00:15:30 +0000 Subject: [PATCH] const-correctness for Song::getPlayPos() --- include/Song.h | 4 ++++ src/core/ProjectRenderer.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/Song.h b/include/Song.h index 3f52cbbb1..2e5fa2401 100644 --- a/include/Song.h +++ b/include/Song.h @@ -186,6 +186,10 @@ public: { return m_playPos[pm]; } + inline const PlayPos & getPlayPos( PlayModes pm ) const + { + return m_playPos[pm]; + } void updateLength(); tact_t length() const diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index e8a91c77d..2aaf5665a 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -163,7 +163,7 @@ void ProjectRenderer::run() //skip first empty buffer Engine::mixer()->nextBuffer(); - Song::PlayPos & pp = Engine::getSong()->getPlayPos( + const Song::PlayPos & pp = Engine::getSong()->getPlayPos( Song::Mode_PlaySong ); m_progress = 0; const int sl = ( Engine::getSong()->length() + 1 ) * 192;