1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 18:23:08 +02:00

Speed up isActive()

This commit is contained in:
Lars-Peter Clausen 2010-05-05 14:35:18 +02:00
parent 09999edc27
commit cb654dd520

View File

@ -170,8 +170,9 @@ bool InputManager::operator[](int action) {
} }
bool InputManager::isActive(int action) { bool InputManager::isActive(int action) {
for (uint x=0; x<mappings[action].size(); x++) { MappingList mapList = mappings[action];
InputMap map = mappings[action][x]; for (MappingList::const_iterator it = mapList.begin(); it !=mapList.end(); ++it) {
InputMap map = *it;
switch (map.type) { switch (map.type) {
case InputManager::MAPPING_TYPE_BUTTON: case InputManager::MAPPING_TYPE_BUTTON: