Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2015, 7:05:53 PM (8 years ago)
Author:
muemart
Message:

Run clang-modernize -loop-convert

  • Again, not all possible loops were converted
  • It can do pretty cool transformations, but I had to fix a few compile errors, so there might be some runtime errors lurking around too
File:
1 edited

Legend:

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

    r10817 r10821  
    226226    {
    227227        // execute all buffered bindings (additional parameter)
    228         for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
     228        for (auto & elem : paramCommandBuffer_)
    229229        {
    230             paramCommandBuffer_[i]->rel_ *= dt;
    231             paramCommandBuffer_[i]->execute();
     230            elem->rel_ *= dt;
     231            elem->execute();
    232232        }
    233233
    234234        // always reset the relative movement of the mouse
    235         for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
    236             mouseAxes_[i].relVal_ = 0.0f;
     235        for (auto & elem : mouseAxes_)
     236            elem.relVal_ = 0.0f;
    237237    }
    238238}// tolua_export
Note: See TracChangeset for help on using the changeset viewer.