operator== is always const

This commit is contained in:
Glenn Maynard
2004-01-18 07:44:39 +00:00
parent 6781f47973
commit 333e32ef25
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -469,7 +469,7 @@ float PlayerOptions::GetReversePercentForColumn( int iCol )
return f; return f;
} }
bool PlayerOptions::operator==( const PlayerOptions &other ) bool PlayerOptions::operator==( const PlayerOptions &other ) const
{ {
#define COMPARE(x) { if( x != other.x ) return false; } #define COMPARE(x) { if( x != other.x ) return false; }
COMPARE(m_bTimeSpacing); COMPARE(m_bTimeSpacing);
+2 -2
View File
@@ -20,8 +20,8 @@ struct PlayerOptions
void FromString( CString sOptions ); void FromString( CString sOptions );
void ChooseRandomMofifiers(); void ChooseRandomMofifiers();
bool operator==( const PlayerOptions &other ); bool operator==( const PlayerOptions &other ) const;
bool operator!=( const PlayerOptions &other ) { return !operator==(other); } bool operator!=( const PlayerOptions &other ) const { return !operator==(other); }
enum Accel { enum Accel {
+1 -1
View File
@@ -126,7 +126,7 @@ void SongOptions::FromString( CString sOptions )
} }
} }
bool SongOptions::operator==( const SongOptions &other ) bool SongOptions::operator==( const SongOptions &other ) const
{ {
#define COMPARE(x) { if( x != other.x ) return false; } #define COMPARE(x) { if( x != other.x ) return false; }
COMPARE( m_LifeType ); COMPARE( m_LifeType );
+2 -2
View File
@@ -30,8 +30,8 @@ struct SongOptions
CString GetString() const; CString GetString() const;
void FromString( CString sOptions ); void FromString( CString sOptions );
bool operator==( const SongOptions &other ); bool operator==( const SongOptions &other ) const;
bool operator!=( const SongOptions &other ) { return !operator==(other); } bool operator!=( const SongOptions &other ) const { return !operator==(other); }
}; };
#endif #endif