Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[InputCommon] Fix a bug in ControllerInterface::UpdateOutput() in Con…
…trollerInterface.cpp. The variable ok_count was never incremented, which caused the function to always return false.
  • Loading branch information
lioncash committed Sep 18, 2013
1 parent d03fb11 commit af951f4
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -178,11 +178,11 @@ bool ControllerInterface::UpdateOutput(const bool force)

size_t ok_count = 0;

std::vector<Device*>::const_iterator
d = m_devices.begin(),
e = m_devices.end();
for (;d != e; ++d)
(*d)->UpdateOutput();
for (auto d = m_devices.cbegin(); d != m_devices.cend(); ++d)
{
if ((*d)->UpdateOutput())
++ok_count;
}

return (m_devices.size() == ok_count);
}
Expand Down

0 comments on commit af951f4

Please sign in to comment.