Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (9 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc

    r10821 r10916  
    153153    void KeyBinder::buttonThresholdChanged()
    154154    {
    155         for (auto & elem : allHalfAxes_)
    156             if (!elem->bButtonThresholdUser_)
    157                 elem->buttonThreshold_ = this->buttonThreshold_;
     155        for (HalfAxis* halfAxis : allHalfAxes_)
     156            if (!halfAxis->bButtonThresholdUser_)
     157                halfAxis->buttonThreshold_ = this->buttonThreshold_;
    158158    }
    159159
     
    383383            it->second->clear();
    384384
    385         for (auto & elem : paramCommandBuffer_)
    386             delete elem;
     385        for (BufferedParamCommand* command : paramCommandBuffer_)
     386            delete command;
    387387        paramCommandBuffer_.clear();
    388388    }
     
    394394    {
    395395        // iterate over all buttons
    396         for (const auto & elem : this->allButtons_)
    397         {
    398             Button* button = elem.second;
     396        for (const auto& mapEntry : this->allButtons_)
     397        {
     398            Button* button = mapEntry.second;
    399399
    400400            // iterate over all modes
     
    465465        this->mousePosition_[1] = 0.0f;
    466466
    467         for (auto & elem : mouseAxes_)
    468             elem.reset();
     467        for (HalfAxis& axis : mouseAxes_)
     468            axis.reset();
    469469    }
    470470
     
    505505        }
    506506
    507         for (auto & elem : mouseAxes_)
     507        for (HalfAxis& axis : mouseAxes_)
    508508        {
    509509            // Why dividing relative value by dt? The reason lies in the simple fact, that when you
     
    515515            {
    516516                // just ignore if dt == 0.0 because we have multiplied by 0.0 anyway..
    517                 elem.relVal_ /= dt;
    518             }
    519 
    520             tickHalfAxis(elem);
     517                axis.relVal_ /= dt;
     518            }
     519
     520            tickHalfAxis(axis);
    521521        }
    522522    }
Note: See TracChangeset for help on using the changeset viewer.