vector<bool> x; bool &b = x[0]; is illegal: vector<bool> 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!)
This commit is contained in:
Glenn Maynard
2004-01-12 01:59:34 +00:00
parent 8a3b448bd9
commit f7491cb268
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -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;
}
}
}