Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2015, 7:05:53 PM (9 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/util/output/OutputManager.cc

    r10768 r10821  
    132132        vectorize(message, '\n', &lines);
    133133
    134         for (size_t i = 0; i < this->listeners_.size(); ++i)
    135             this->listeners_[i]->unfilteredOutput(level, context, lines);
     134        for (auto & elem : this->listeners_)
     135            elem->unfilteredOutput(level, context, lines);
    136136    }
    137137
     
    179179    {
    180180        int mask = 0;
    181         for (size_t i = 0; i < this->listeners_.size(); ++i)
    182             mask |= this->listeners_[i]->getLevelMask();
     181        for (auto & elem : this->listeners_)
     182            mask |= elem->getLevelMask();
    183183        this->combinedLevelMask_ = static_cast<OutputLevel>(mask);
    184184    }
     
    190190    {
    191191        int mask = 0;
    192         for (size_t i = 0; i < this->listeners_.size(); ++i)
    193             mask |= this->listeners_[i]->getAdditionalContextsLevelMask();
     192        for (auto & elem : this->listeners_)
     193            mask |= elem->getAdditionalContextsLevelMask();
    194194        this->combinedAdditionalContextsLevelMask_ = static_cast<OutputLevel>(mask);
    195195    }
     
    201201    {
    202202        this->combinedAdditionalContextsMask_ = 0;
    203         for (size_t i = 0; i < this->listeners_.size(); ++i)
    204             this->combinedAdditionalContextsMask_ |= this->listeners_[i]->getAdditionalContextsMask();
     203        for (auto & elem : this->listeners_)
     204            this->combinedAdditionalContextsMask_ |= elem->getAdditionalContextsMask();
    205205    }
    206206
Note: See TracChangeset for help on using the changeset viewer.