From 16bd1d06cbdd93632ed0d43ebf4b5fc63c139fad Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Jan 2006 22:51:01 +0000 Subject: [PATCH] const --- stepmania/src/NoteField.cpp | 10 +++++----- stepmania/src/NoteField.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 86eccf7190..c87814087a 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -158,7 +158,7 @@ void NoteField::ProcessMessages( float fDeltaTime ) } } -float NoteField::GetWidth() +float NoteField::GetWidth() const { const Style* pStyle = GAMESTATE->GetCurrentStyle(); float fMinX, fMaxX; @@ -376,7 +376,7 @@ float FindLastDisplayedBeat( const PlayerState* pPlayerState, int iLastPixelToDr return fLastBeatToDraw; } -bool NoteField::IsOnScreen( float fBeat, int iFirstPixelToDraw, int iLastPixelToDraw ) +bool NoteField::IsOnScreen( float fBeat, int iFirstPixelToDraw, int iLastPixelToDraw ) const { // TRICKY: If boomerang is on, then ones in the range // [iFirstIndexToDraw,iLastIndexToDraw] aren't necessarily visible. @@ -456,7 +456,7 @@ void NoteField::DrawPrimitives() // // BPM text // - vector &aBPMSegments = GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments; + const vector &aBPMSegments = GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments; for( unsigned i=0; i= iFirstIndexToDraw && @@ -471,7 +471,7 @@ void NoteField::DrawPrimitives() // // Freeze text // - vector &aStopSegments = GAMESTATE->m_pCurSong->m_Timing.m_StopSegments; + const vector &aStopSegments = GAMESTATE->m_pCurSong->m_Timing.m_StopSegments; for( unsigned i=0; i= iFirstIndexToDraw && @@ -486,7 +486,7 @@ void NoteField::DrawPrimitives() // // Course mods text // - Course *pCourse = GAMESTATE->m_pCurCourse; + const Course *pCourse = GAMESTATE->m_pCurCourse; if( pCourse ) { const CourseEntry &ce = pCourse->m_vEntries[GAMESTATE->m_iEditCourseEntryIndex]; diff --git a/stepmania/src/NoteField.h b/stepmania/src/NoteField.h index 3cf91e85f8..be7a130315 100644 --- a/stepmania/src/NoteField.h +++ b/stepmania/src/NoteField.h @@ -43,7 +43,7 @@ public: protected: void CacheAllUsedNoteSkins(); - bool IsOnScreen( float fBeat, int iFirstPixelToDraw, int iLastPixelToDraw ); + bool IsOnScreen( float fBeat, int iFirstPixelToDraw, int iLastPixelToDraw ) const; void DrawBeatBar( const float fBeat ); void DrawMarkerBar( int fBeat ); @@ -52,7 +52,7 @@ protected: void DrawFreezeText( const float fBeat, const float fBPM ); void DrawAttackText( const float fBeat, const Attack &attack ); void DrawBGChangeText( const float fBeat, const RString sNewBGName ); - float GetWidth(); + float GetWidth() const; const NoteData *m_pNoteData;