Whoops, need to call reserve() instead of passing 100 to the constructor.

This commit is contained in:
Joseph Lenox 2018-07-24 23:37:10 -05:00
parent 048c52cafd
commit 1a94921462

View File

@ -186,7 +186,8 @@ PrintGCode::output()
p.emplace_back(obj->_shifted_copies.at(0));
Geometry::chained_path(p, obj_idx);
std::vector<size_t> z(100); // preallocate with 100 layers
std::vector<size_t> z;
z.reserve(100); // preallocate with 100 layers
std::map<coord_t, LayerPtrs> layers {};
for (size_t idx = 0U; idx < print.objects.size(); ++idx) {
const auto& object {*(objects.at(idx))};