Fix g++ compile: operator< must be const
Fix warnings
This commit is contained in:
@@ -764,8 +764,8 @@ struct SongAndSteps
|
|||||||
{
|
{
|
||||||
Song* pSong;
|
Song* pSong;
|
||||||
Steps* pSteps;
|
Steps* 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 ) { 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<RankingFeats> &asFeatsOut )
|
void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeats> &asFeatsOut )
|
||||||
@@ -788,7 +788,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeats> &asFeatsO
|
|||||||
//
|
//
|
||||||
vector<SongAndSteps> vSongAndSteps;
|
vector<SongAndSteps> vSongAndSteps;
|
||||||
|
|
||||||
for( i=0; i<(int)m_vPlayedStageStats.size(); i++ )
|
for( i=0; i<m_vPlayedStageStats.size(); i++ )
|
||||||
{
|
{
|
||||||
SongAndSteps sas;
|
SongAndSteps sas;
|
||||||
sas.pSong = m_vPlayedStageStats[i].pSong;
|
sas.pSong = m_vPlayedStageStats[i].pSong;
|
||||||
@@ -803,7 +803,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeats> &asFeatsO
|
|||||||
vector<SongAndSteps>::iterator toDelete = unique( vSongAndSteps.begin(), vSongAndSteps.end() );
|
vector<SongAndSteps>::iterator toDelete = unique( vSongAndSteps.begin(), vSongAndSteps.end() );
|
||||||
vSongAndSteps.erase(toDelete, vSongAndSteps.end());
|
vSongAndSteps.erase(toDelete, vSongAndSteps.end());
|
||||||
|
|
||||||
for( i=0; i<(int)vSongAndSteps.size(); i++ )
|
for( i=0; i<vSongAndSteps.size(); i++ )
|
||||||
{
|
{
|
||||||
Song* pSong = vSongAndSteps[i].pSong;
|
Song* pSong = vSongAndSteps[i].pSong;
|
||||||
Steps* pSteps = vSongAndSteps[i].pSteps;
|
Steps* pSteps = vSongAndSteps[i].pSteps;
|
||||||
|
|||||||
Reference in New Issue
Block a user