Changeset 3546


Ignore:
Timestamp:
Dec 29, 2016, 2:28:35 AM (5 years ago)
Author:
Peter
Message:

prefer using constructor rather empty construction + std::copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/normalizer/qQuantileNormalizer.h

    r3545 r3546  
    412412  {
    413413    using namespace utility;
    414     std::vector<DataWeight> vec;
    415     vec.reserve(std::distance(first, last));
    416     std::back_insert_iterator<std::vector<DataWeight> > inserter(vec);
    417     std::copy(first, last, inserter);
     414    std::vector<DataWeight> vec(first, last);
    418415    std::sort(vec.begin(), vec.end());
    419416    init(vec, N);
Note: See TracChangeset for help on using the changeset viewer.