From 460efa36573ef216bd91330ab6a90ee25756ce25 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 21 Oct 2003 06:12:06 +0000 Subject: [PATCH] Fix g++ compile: operator< must be const Fix warnings --- stepmania/src/GameState.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index d77487f378..4082721e77 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -764,8 +764,8 @@ struct SongAndSteps { Song* pSong; Steps* pSteps; - bool operator==( const SongAndSteps& other ) { return pSong==other.pSong && pSteps==other.pSteps; } - bool operator<( const SongAndSteps& other ) { return pSong<=other.pSong && pSteps<=other.pSteps; } + bool operator==( const SongAndSteps& other ) const { return pSong==other.pSong && pSteps==other.pSteps; } + bool operator<( const SongAndSteps& other ) const { return pSong<=other.pSong && pSteps<=other.pSteps; } }; void GameState::GetRankingFeats( PlayerNumber pn, vector &asFeatsOut ) @@ -788,7 +788,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector &asFeatsO // vector vSongAndSteps; - for( i=0; i<(int)m_vPlayedStageStats.size(); i++ ) + for( i=0; i &asFeatsO vector::iterator toDelete = unique( vSongAndSteps.begin(), vSongAndSteps.end() ); vSongAndSteps.erase(toDelete, vSongAndSteps.end()); - for( i=0; i<(int)vSongAndSteps.size(); i++ ) + for( i=0; i