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/Mouse.cc

    r10768 r10821  
    8282            IntVector2 rel(e.state.X.rel, e.state.Y.rel);
    8383            IntVector2 clippingSize(e.state.width, e.state.height);
    84             for (unsigned int i = 0; i < inputStates_.size(); ++i)
    85                 inputStates_[i]->mouseMoved(abs, rel, clippingSize);
     84            for (auto & elem : inputStates_)
     85                elem->mouseMoved(abs, rel, clippingSize);
    8686        }
    8787
     
    8989        if (e.state.Z.rel != 0)
    9090        {
    91             for (unsigned int i = 0; i < inputStates_.size(); ++i)
    92                 inputStates_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
     91            for (auto & elem : inputStates_)
     92                elem->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
    9393        }
    9494
Note: See TracChangeset for help on using the changeset viewer.