From 7046538f4e9441878ed5118439224b9b520a2b64 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 11 Oct 2006 10:15:36 +0000 Subject: [PATCH] Casting an rvalue to nonconst reference is illegal. I'm not positive why these are considered to be rvalues when they are cast. --- stepmania/src/LightsManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index 06476d5f54..f01c46deec 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -426,7 +426,11 @@ void LightsManager::ChangeTestCabinetLight( int iDir ) m_iControllerTestManualCycleCurrent = -1; m_clTestManualCycleCurrent = (CabinetLight)(m_clTestManualCycleCurrent+iDir); - wrap( (int&)m_clTestManualCycleCurrent, NUM_CabinetLight ); + { + int temp = m_clTestManualCycleCurrent; + wrap( temp, NUM_CabinetLight ); + m_clTestManualCycleCurrent = CabinetLight( temp ); + } } void LightsManager::ChangeTestGameButtonLight( int iDir )