- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
r10772 r10821 153 153 void KeyBinder::buttonThresholdChanged() 154 154 { 155 for ( unsigned int i = 0; i < allHalfAxes_.size(); i++)156 if (! allHalfAxes_[i]->bButtonThresholdUser_)157 allHalfAxes_[i]->buttonThreshold_ = this->buttonThreshold_;155 for (auto & elem : allHalfAxes_) 156 if (!elem->bButtonThresholdUser_) 157 elem->buttonThreshold_ = this->buttonThreshold_; 158 158 } 159 159 … … 383 383 it->second->clear(); 384 384 385 for ( unsigned int i = 0; i < paramCommandBuffer_.size(); i++)386 delete paramCommandBuffer_[i];385 for (auto & elem : paramCommandBuffer_) 386 delete elem; 387 387 paramCommandBuffer_.clear(); 388 388 } … … 394 394 { 395 395 // iterate over all buttons 396 for ( std::map<std::string, Button*>::iterator it = this->allButtons_.begin(); it != this->allButtons_.end(); ++it)397 { 398 Button* button = it->second;396 for (const auto & elem : this->allButtons_) 397 { 398 Button* button = elem.second; 399 399 400 400 // iterate over all modes … … 465 465 this->mousePosition_[1] = 0.0f; 466 466 467 for ( unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)468 mouseAxes_[i].reset();467 for (auto & elem : mouseAxes_) 468 elem.reset(); 469 469 } 470 470 … … 505 505 } 506 506 507 for ( unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)507 for (auto & elem : mouseAxes_) 508 508 { 509 509 // Why dividing relative value by dt? The reason lies in the simple fact, that when you … … 515 515 { 516 516 // just ignore if dt == 0.0 because we have multiplied by 0.0 anyway.. 517 mouseAxes_[i].relVal_ /= dt;518 } 519 520 tickHalfAxis( mouseAxes_[i]);517 elem.relVal_ /= dt; 518 } 519 520 tickHalfAxis(elem); 521 521 } 522 522 }
Note: See TracChangeset
for help on using the changeset viewer.