Changeset 3244


Ignore:
Timestamp:
May 24, 2014, 6:37:48 PM (7 years ago)
Author:
Peter
Message:

prefer range constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/Percentiler.h

    r3243 r3244  
    217217    }
    218218
    219     std::vector<utility::DataWeight> v_copy;
    220     v_copy.reserve(last-first);
    221     std::copy(first, last, std::back_inserter(v_copy));
     219    std::vector<utility::DataWeight> v_copy(first, last);
    222220    std::sort(v_copy.begin(), v_copy.end());
    223221    return calculate(v_copy.begin(), v_copy.end(), true, tag);
Note: See TracChangeset for help on using the changeset viewer.