# | Line 319 | Line 319 | std::vector<int> CubicSpline::sort_permutation(std::ve | |
---|---|---|
319 | ||
320 | std::vector<int> CubicSpline::sort_permutation(std::vector<RealType>& v) { | |
321 | std::vector<int> p(v.size()); | |
322 | < | std::iota(p.begin(), p.end(), 0); |
322 | > | |
323 | > | // 6 lines to replace std::iota(p.begin(), p.end(), 0); |
324 | > | int value = 0; |
325 | > | std::vector<int>::iterator i; |
326 | > | for (i = p.begin(); i != p.end(); ++i) { |
327 | > | (*i) = value; |
328 | > | ++value; |
329 | > | } |
330 | > | |
331 | std::sort(p.begin(), p.end(), OpenMD::Comparator(v) ); | |
332 | return p; | |
333 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |