Simple one to fix.

This commit is contained in:
Jason Felds
2013-04-30 23:01:47 -04:00
parent 46824a6fbb
commit 9cbcf304a6
+4 -3
View File
@@ -7,11 +7,12 @@ REGISTER_SCREEN_CLASS( ScreenUnlockBrowse );
void ScreenUnlockBrowse::Init() void ScreenUnlockBrowse::Init()
{ {
int index = 0;
// fill m_aGameCommands before calling Init() // fill m_aGameCommands before calling Init()
FOREACH_CONST( UnlockEntry, UNLOCKMAN->m_UnlockEntries, ue ) for (UnlockEntry const &ue : UNLOCKMAN->m_UnlockEntries)
{ {
GameCommand gc; GameCommand gc;
UnlockEntryStatus st = ue->GetUnlockEntryStatus(); UnlockEntryStatus st = ue.GetUnlockEntryStatus();
switch( st ) switch( st )
{ {
default: default:
@@ -23,7 +24,7 @@ void ScreenUnlockBrowse::Init()
case UnlockEntryStatus_RequrementsNotMet: case UnlockEntryStatus_RequrementsNotMet:
break; break;
} }
gc.m_iIndex = ue - UNLOCKMAN->m_UnlockEntries.begin(); gc.m_iIndex = index++;
// gc.m_sUnlockEntryID = ue->m_sEntryID; // gc.m_sUnlockEntryID = ue->m_sEntryID;
gc.m_sName = ssprintf("%d",gc.m_iIndex); gc.m_sName = ssprintf("%d",gc.m_iIndex);