From 354fbd9a87dee87ad8d4206da9ec5eecb90ee865 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 7 Nov 2003 20:43:03 +0000 Subject: [PATCH] Const, include fixes. --- stepmania/src/BGAnimation.h | 2 +- stepmania/src/HelpDisplay.cpp | 4 +++- stepmania/src/HelpDisplay.h | 4 +--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index 79b084c63b..ee10c19af9 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -39,7 +39,7 @@ public: void GainingFocus( float fRate, bool bRewindMovie, bool bLoop ); void LosingFocus(); - float GetLengthSeconds() { return m_fLengthSeconds; } + float GetLengthSeconds() const { return m_fLengthSeconds; } virtual void HandleCommand( const CStringArray &asTokens ); void PlayOffCommand() { PlayCommand("Off"); } diff --git a/stepmania/src/HelpDisplay.cpp b/stepmania/src/HelpDisplay.cpp index 3a9cf7ea98..55b2f6d2f6 100644 --- a/stepmania/src/HelpDisplay.cpp +++ b/stepmania/src/HelpDisplay.cpp @@ -34,11 +34,13 @@ HelpDisplay::HelpDisplay() } -void HelpDisplay::SetTips( CStringArray &arrayTips ) +void HelpDisplay::SetTips( const CStringArray &arrayTips ) { m_arrayTips = arrayTips; if( !m_arrayTips.empty() ) m_textTip.SetText( m_arrayTips[0] ); + else + m_textTip.SetText( "" ); } diff --git a/stepmania/src/HelpDisplay.h b/stepmania/src/HelpDisplay.h index a11d7e1e90..3c90a4b9c8 100644 --- a/stepmania/src/HelpDisplay.h +++ b/stepmania/src/HelpDisplay.h @@ -11,8 +11,6 @@ ----------------------------------------------------------------------------- */ -#include "Sprite.h" -#include "song.h" #include "ActorFrame.h" #include "BitmapText.h" @@ -21,7 +19,7 @@ class HelpDisplay : public ActorFrame { public: HelpDisplay(); - void SetTips( CStringArray &arrayTips ); + void SetTips( const CStringArray &arrayTips ); virtual void Update( float fDeltaTime );