Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (8 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/InputManager.cc

    r10821 r10916  
    373373        // check whether a state has changed its EMPTY situation
    374374        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();
    380380                bUpdateRequired = true;
    381381            }
     
    391391
    392392        // 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());
    395395
    396396        // Execute all cached function calls in order
     
    401401        // If we delay the calls, then OIS and and the InputStates are not anymore
    402402        // 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();
    405405
    406406        this->callBuffer_.clear();
     
    437437        // Using an std::set to avoid duplicates
    438438        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]);
    443443
    444444        // Copy the content of the std::set back to the actual vector
    445445        activeStatesTicked_.clear();
    446         for (const auto & elem : tempSet)
    447             activeStatesTicked_.push_back(elem);
     446        for (InputState* state : tempSet)
     447            activeStatesTicked_.push_back(state);
    448448
    449449        // Check whether we have to change the mouse mode
Note: See TracChangeset for help on using the changeset viewer.