From f50d78d94a6db3b5734826c720644d5ead6bd94b Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 31 May 2004 22:03:01 +0000 Subject: [PATCH] Use a reference and add an assert to track a bug --- stepmania/src/StyleDef.cpp | 2 +- stepmania/src/StyleDef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/StyleDef.cpp b/stepmania/src/StyleDef.cpp index 2e4228fbd2..45cafd0862 100644 --- a/stepmania/src/StyleDef.cpp +++ b/stepmania/src/StyleDef.cpp @@ -37,7 +37,7 @@ void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData* } -GameInput StyleDef::StyleInputToGameInput( const StyleInput StyleI ) const +GameInput StyleDef::StyleInputToGameInput( const StyleInput& StyleI ) const { ASSERT_M( StyleI.player < NUM_PLAYERS, ssprintf("P%i", StyleI.player) ); ASSERT_M( StyleI.col < MAX_COLS_PER_PLAYER, ssprintf("C%i", StyleI.col) ); diff --git a/stepmania/src/StyleDef.h b/stepmania/src/StyleDef.h index 41722e5f75..ee09bfd2b5 100644 --- a/stepmania/src/StyleDef.h +++ b/stepmania/src/StyleDef.h @@ -50,7 +50,7 @@ public: ColumnInfo m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; // maps each players' column to a track in the NoteData int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; - GameInput StyleInputToGameInput( const StyleInput StyleI ) const; + GameInput StyleInputToGameInput( const StyleInput& StyleI ) const; StyleInput GameInputToStyleInput( const GameInput &GameI ) const; PlayerNumber ControllerToPlayerNumber( GameController controller ) const;