From 333e32ef251f0b0ef537079fd8e0ea6dd05a8e39 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 18 Jan 2004 07:44:39 +0000 Subject: [PATCH] operator== is always const --- stepmania/src/PlayerOptions.cpp | 2 +- stepmania/src/PlayerOptions.h | 4 ++-- stepmania/src/SongOptions.cpp | 2 +- stepmania/src/SongOptions.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/PlayerOptions.cpp b/stepmania/src/PlayerOptions.cpp index 870deac819..93a7c2da91 100644 --- a/stepmania/src/PlayerOptions.cpp +++ b/stepmania/src/PlayerOptions.cpp @@ -469,7 +469,7 @@ float PlayerOptions::GetReversePercentForColumn( int iCol ) return f; } -bool PlayerOptions::operator==( const PlayerOptions &other ) +bool PlayerOptions::operator==( const PlayerOptions &other ) const { #define COMPARE(x) { if( x != other.x ) return false; } COMPARE(m_bTimeSpacing); diff --git a/stepmania/src/PlayerOptions.h b/stepmania/src/PlayerOptions.h index 49c3119976..bb50f3cd17 100644 --- a/stepmania/src/PlayerOptions.h +++ b/stepmania/src/PlayerOptions.h @@ -20,8 +20,8 @@ struct PlayerOptions void FromString( CString sOptions ); void ChooseRandomMofifiers(); - bool operator==( const PlayerOptions &other ); - bool operator!=( const PlayerOptions &other ) { return !operator==(other); } + bool operator==( const PlayerOptions &other ) const; + bool operator!=( const PlayerOptions &other ) const { return !operator==(other); } enum Accel { diff --git a/stepmania/src/SongOptions.cpp b/stepmania/src/SongOptions.cpp index 4c0ce26e6b..00f1f681ed 100644 --- a/stepmania/src/SongOptions.cpp +++ b/stepmania/src/SongOptions.cpp @@ -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; } COMPARE( m_LifeType ); diff --git a/stepmania/src/SongOptions.h b/stepmania/src/SongOptions.h index 4a28f58cd4..195e2dfde2 100644 --- a/stepmania/src/SongOptions.h +++ b/stepmania/src/SongOptions.h @@ -30,8 +30,8 @@ struct SongOptions CString GetString() const; void FromString( CString sOptions ); - bool operator==( const SongOptions &other ); - bool operator!=( const SongOptions &other ) { return !operator==(other); } + bool operator==( const SongOptions &other ) const; + bool operator!=( const SongOptions &other ) const { return !operator==(other); } }; #endif