Two loops here.

This commit is contained in:
Jason Felds
2013-04-30 21:25:00 -04:00
parent 1be48d1d93
commit 0f729945d2
+4 -4
View File
@@ -109,8 +109,8 @@ void RageInput::AddHandler( InputHandler *pHandler )
vector<InputDeviceInfo> aDeviceInfo; vector<InputDeviceInfo> aDeviceInfo;
hand.m_pDevice->GetDevicesAndDescriptions( aDeviceInfo ); hand.m_pDevice->GetDevicesAndDescriptions( aDeviceInfo );
FOREACH_CONST( InputDeviceInfo, aDeviceInfo, idi ) for (InputDeviceInfo const &idi : aDeviceInfo)
g_mapDeviceToHandler[idi->id] = pHandler; g_mapDeviceToHandler[idi.id] = pHandler;
} }
/** @brief Return the first InputDriver for the requested InputDevice. */ /** @brief Return the first InputDriver for the requested InputDevice. */
@@ -187,8 +187,8 @@ public:
vector<InputDeviceInfo> vDevices; vector<InputDeviceInfo> vDevices;
p->GetDevicesAndDescriptions( vDevices ); p->GetDevicesAndDescriptions( vDevices );
vector<RString> vsDescriptions; vector<RString> vsDescriptions;
FOREACH_CONST( InputDeviceInfo, vDevices, idi ) for (InputDeviceInfo const &idi : vDevices)
vsDescriptions.push_back( idi->sDesc ); vsDescriptions.push_back( idi.sDesc );
LuaHelpers::CreateTableFromArray( vsDescriptions, L ); LuaHelpers::CreateTableFromArray( vsDescriptions, L );
return 1; return 1;
} }