Nathan Walker 5eee20be97 clean up instances of std::copy
In many places, std::copy was used with back_inserters, or other
std::inserters. These have in most cases been replaced by using the
ranged insert member function of each stl container. Firstly, this makes more
readable code. Also, this is often more efficient because,
if the compiler can find the distance between the source iterators,
it only has to make one block allocation and then fill it
with values. In other cases, containers were being default constructed
and then std::copy'd into with some form of inserter. These were cleaned up
by using the iterator range constructor instead.
Use of std::copy was especially egregious in the case of associative
containers such as map and set. Sometimes back_inserter was
being used, other times std::inserter set at front, but it doesn't matter
because there is no front or back when inserting, and it's much cleaner
to just use set or map::insert(iterator begin, iterator end).
2014-03-19 21:23:27 -05:00
..