Fixed warning (and, on the way, make the code slightly faster)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6774 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-11-29 17:01:58 +00:00
parent afce1534b9
commit 3543dc4f86

View File

@ -131,11 +131,10 @@ void DeviceManager::setAssignMode(const PlayerAssignMode assignMode)
// -----------------------------------------------------------------------------
GamePadDevice* DeviceManager::getGamePadFromIrrID(const int id)
{
GamePadDevice *gamepad = NULL;
for(int i = 0; i < m_gamepads.size(); i++)
const int count = m_gamepads.size();
for (int i = 0; i < count; i++)
{
if(m_gamepads[i].m_index == id)
if (m_gamepads[i].m_index == id)
{
return m_gamepads.get(i);