- Timestamp:
- Dec 2, 2015, 11:22:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
r10821 r10916 373 373 // check whether a state has changed its EMPTY situation 374 374 bool bUpdateRequired = false; 375 for (auto & elem: activeStates_)376 { 377 if ( elem.second->hasExpired())378 { 379 elem.second->resetExpiration();375 for (auto& mapEntry : activeStates_) 376 { 377 if (mapEntry.second->hasExpired()) 378 { 379 mapEntry.second->resetExpiration(); 380 380 bUpdateRequired = true; 381 381 } … … 391 391 392 392 // Collect function calls for the update 393 for ( auto & elem: activeStatesTicked_)394 elem->update(time.getDeltaTime());393 for (InputState* state : activeStatesTicked_) 394 state->update(time.getDeltaTime()); 395 395 396 396 // Execute all cached function calls in order … … 401 401 // If we delay the calls, then OIS and and the InputStates are not anymore 402 402 // in the call stack and can therefore be edited. 403 for (auto & elem: this->callBuffer_)404 elem();403 for (auto& function : this->callBuffer_) 404 function(); 405 405 406 406 this->callBuffer_.clear(); … … 437 437 // Using an std::set to avoid duplicates 438 438 std::set<InputState*> tempSet; 439 for ( auto & elem: devices_)440 if ( elem!= nullptr)441 for (unsigned int iState = 0; iState < elem->getStateListRef().size(); ++iState)442 tempSet.insert( elem->getStateListRef()[iState]);439 for (InputDevice* device : devices_) 440 if (device != nullptr) 441 for (unsigned int iState = 0; iState < device->getStateListRef().size(); ++iState) 442 tempSet.insert(device->getStateListRef()[iState]); 443 443 444 444 // Copy the content of the std::set back to the actual vector 445 445 activeStatesTicked_.clear(); 446 for ( const auto & elem: tempSet)447 activeStatesTicked_.push_back( elem);446 for (InputState* state : tempSet) 447 activeStatesTicked_.push_back(state); 448 448 449 449 // Check whether we have to change the mouse mode
Note: See TracChangeset
for help on using the changeset viewer.