Casting an rvalue to nonconst reference is illegal. I'm not positive why these are considered to be rvalues when they are cast.
This commit is contained in:
@@ -1161,7 +1161,11 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
|
||||
pNode->GetChildValue( "TotalGameplaySeconds", m_iTotalGameplaySeconds );
|
||||
pNode->GetChildValue( "CurrentCombo", m_iCurrentCombo );
|
||||
pNode->GetChildValue( "TotalCaloriesBurned", m_fTotalCaloriesBurned );
|
||||
pNode->GetChildValue( "GoalType", (int&)m_GoalType );
|
||||
{
|
||||
int temp;
|
||||
pNode->GetChildValue( "GoalType", temp );
|
||||
m_GoalType = GoalType( temp );
|
||||
}
|
||||
pNode->GetChildValue( "GoalCalories", m_iGoalCalories );
|
||||
pNode->GetChildValue( "GoalSeconds", m_iGoalSeconds );
|
||||
pNode->GetChildValue( "LastPlayedMachineGuid", m_sLastPlayedMachineGuid );
|
||||
|
||||
@@ -78,7 +78,7 @@ void ScreenPrompt::BeginScreen()
|
||||
ScreenWithMenuElements::BeginScreen();
|
||||
|
||||
m_Answer = g_defaultAnswer;
|
||||
CLAMP( (int&)m_Answer, 0, g_PromptType );
|
||||
ENUM_CLAMP( m_Answer, PromptAnswer(0), PromptAnswer(g_PromptType) );
|
||||
|
||||
m_textQuestion.SetText( g_sText );
|
||||
SET_XY_AND_ON_COMMAND( m_textQuestion );
|
||||
|
||||
@@ -148,7 +148,7 @@ void ScreenSetTime::ChangeSelection( int iDirection )
|
||||
SetTimeSelection OldSelection = m_Selection;
|
||||
enum_add<SetTimeSelection>( m_Selection, iDirection );
|
||||
|
||||
CLAMP( (int&)m_Selection, 0, NUM_SetTimeSelection-1 );
|
||||
ENUM_CLAMP( m_Selection, SetTimeSelection(0), SetTimeSelection(NUM_SetTimeSelection-1) );
|
||||
if( iDirection != 0 && m_Selection == OldSelection )
|
||||
return; // can't move any more
|
||||
|
||||
|
||||
@@ -406,7 +406,11 @@ void ScreenTextEntryVisual::MoveY( int iDir )
|
||||
do
|
||||
{
|
||||
m_iFocusY = enum_add2( m_iFocusY, +iDir );
|
||||
wrap( (int&)m_iFocusY, NUM_KeyboardRow );
|
||||
{
|
||||
int temp = m_iFocusY;
|
||||
wrap( temp, NUM_KeyboardRow );
|
||||
m_iFocusY = KeyboardRow( temp );
|
||||
}
|
||||
|
||||
// HACK: Round to nearest option so that we always stop
|
||||
// on KEYBOARD_ROW_SPECIAL.
|
||||
|
||||
Reference in New Issue
Block a user