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

    r10777 r10821  
    165165                        std::ostringstream message;
    166166                        message << "Possible sources of error:" << endl;
    167                         for (std::vector<std::pair<std::string, size_t>>::iterator it = linesources.begin(); it != linesources.end(); ++it)
     167                        for (auto & linesource : linesources)
    168168                        {
    169                             message << it->first << ", Line " << it->second << endl;
     169                            message << linesource.first << ", Line " << linesource.second << endl;
    170170                        }
    171171                        orxout(user_error, context::loader) << message.str() << endl;
     
    261261        {
    262262            bool expectedValue = true;
    263             for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
    264             {
    265                 if (it->second == expectedValue)
     263            for (auto & luaTag : luaTags)
     264            {
     265                if (luaTag.second == expectedValue)
    266266                    expectedValue = !expectedValue;
    267267                else
Note: See TracChangeset for help on using the changeset viewer.