From f7491cb268962413b88a2c6fb48c3ebd878872c5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 12 Jan 2004 01:59:34 +0000 Subject: [PATCH] vector x; bool &b = x[0]; is illegal: vector is optimized to a bitset (packed), and you can't have a pointer to a packed bit (stupid optimization; if I want a bitset, I'll use a bitset!) --- stepmania/src/ScreenOptions.cpp | 2 +- stepmania/src/ScreenOptionsMaster.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 9a97b8bc3d..b1944a2a8d 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -1108,7 +1108,7 @@ void ScreenOptions::MenuStart( PlayerNumber pn, const InputEventType type ) if( data.bMultiSelect ) { int iChoiceInRow = row.m_iChoiceWithFocus[pn]; - row.m_vbSelected[pn][iChoiceInRow] ^= true; + row.m_vbSelected[pn][iChoiceInRow] = !row.m_vbSelected[pn][iChoiceInRow]; if( row.m_vbSelected[pn][iChoiceInRow] ) m_SoundToggleOn.Play(); else diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index fa12cfb085..5b5718ac62 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -298,8 +298,7 @@ void ScreenOptionsMaster::ImportOption( const OptionRowData &row, const OptionRo { const ModeChoice &mc = hand.ListEntries[e]; - bool &bSelected = vbSelectedOut[e]; - bSelected = false; + vbSelectedOut[e] = false; if( mc.IsZero() ) { @@ -318,7 +317,7 @@ void ScreenOptionsMaster::ImportOption( const OptionRowData &row, const OptionRo if( !row.bMultiSelect ) SelectExactlyOne( e, vbSelectedOut ); else - bSelected = true; + vbSelectedOut[e] = true; } } else @@ -328,7 +327,7 @@ void ScreenOptionsMaster::ImportOption( const OptionRowData &row, const OptionRo if( !row.bMultiSelect ) SelectExactlyOne( e, vbSelectedOut ); else - bSelected = true; + vbSelectedOut[e] = true; } } }