Changeset 10919 for code/branches/cpp11_v2/src/libraries/core/input
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/input
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc
r10916 r10919 75 75 InputBuffer::~InputBuffer() 76 76 { 77 for (std::list<BaseInputBufferListenerTuple*>::const_iterator it = this->listeners_.begin(); 78 it != this->listeners_.end(); ++it) 79 delete *it; 77 for (BaseInputBufferListenerTuple* listener : this->listeners_) 78 delete listener; 80 79 } 81 80 -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
r10917 r10919 531 531 { 532 532 // Make sure we don't add two high priority states with the same priority 533 for (std::map<std::string, InputState*>::const_iterator it = this->statesByName_.begin(); 534 it != this->statesByName_.end(); ++it) 533 for (const auto& mapEntry : this->statesByName_) 535 534 { 536 if ( it->second->getPriority() == priority)535 if (mapEntry.second->getPriority() == priority) 537 536 { 538 537 orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '" -
code/branches/cpp11_v2/src/libraries/core/input/JoyStickQuantityListener.cc
r10624 r10919 47 47 { 48 48 joyStickList_s = joyStickList; 49 for ( ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)50 it->JoyStickQuantityChanged(joyStickList);49 for (JoyStickQuantityListener* listener : ObjectList<JoyStickQuantityListener>()) 50 listener->JoyStickQuantityChanged(joyStickList); 51 51 } 52 52 } -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
r10918 r10919 274 274 275 275 // Parse bindings and create the ConfigValueContainers if necessary 276 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)277 { 278 it->second->readBinding(this->configFile_, this->fallbackConfigFile_);279 addButtonToCommand( it->second->bindingString_, it->second);276 for (const auto& mapEntry : allButtons_) 277 { 278 mapEntry.second->readBinding(this->configFile_, this->fallbackConfigFile_); 279 addButtonToCommand(mapEntry.second->bindingString_, mapEntry.second); 280 280 } 281 281 … … 380 380 void KeyBinder::clearBindings() 381 381 { 382 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)383 it->second->clear();382 for (const auto& mapEntry : allButtons_) 383 mapEntry.second->clear(); 384 384 385 385 for (BufferedParamCommand* command : paramCommandBuffer_) -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
r10829 r10919 76 76 { 77 77 // Delete all remaining KeyBinders 78 for ( std::map<std::string, KeyBinder*>::const_iterator it = this->binders_.begin(); it != this->binders_.end(); ++it)79 delete it->second;78 for (const auto& mapEntry : this->binders_) 79 delete mapEntry.second; 80 80 81 81 // Reset console commands -
code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc
r10765 r10919 70 70 { 71 71 // Assign every button/axis the same command, but with its name as argument 72 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)73 it->second->parse(__CC_KeyDetector_callback_name + ' ' + it->second->groupName_ + "." + it->second->name_);72 for (const auto& mapEntry : allButtons_) 73 mapEntry.second->parse(__CC_KeyDetector_callback_name + ' ' + mapEntry.second->groupName_ + "." + mapEntry.second->name_); 74 74 } 75 75
Note: See TracChangeset
for help on using the changeset viewer.