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/config/ConfigValueContainer.h

    r10817 r10821  
    130130
    131131                this->value_ = V();
    132                 for (unsigned int i = 0; i < defvalue.size(); i++)
    133                     this->valueVector_.push_back(MultiType(defvalue[i]));
     132                for (auto & elem : defvalue)
     133                    this->valueVector_.push_back(MultiType(elem));
    134134
    135135                this->initVector();
     
    183183                    std::vector<T> temp = *value;
    184184                    value->clear();
    185                     for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
    186                         value->push_back(this->valueVector_[i]);
     185                    for (auto & elem : this->valueVector_)
     186                        value->push_back(elem);
    187187
    188188                    if (value->size() != temp.size())
     
    211211                {
    212212                    value->clear();
    213                     for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
    214                         value->push_back(this->valueVector_[i]);
     213                    for (auto & elem : this->valueVector_)
     214                        value->push_back(elem);
    215215                }
    216216                return *this;
Note: See TracChangeset for help on using the changeset viewer.