From 1a94921462627a66b57fe8eea2894ba19de52a15 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Jul 2018 23:37:10 -0500 Subject: [PATCH] Whoops, need to call reserve() instead of passing 100 to the constructor. --- xs/src/libslic3r/PrintGCode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/PrintGCode.cpp b/xs/src/libslic3r/PrintGCode.cpp index 5fb2ff9ea..b1a5d4c1e 100644 --- a/xs/src/libslic3r/PrintGCode.cpp +++ b/xs/src/libslic3r/PrintGCode.cpp @@ -186,7 +186,8 @@ PrintGCode::output() p.emplace_back(obj->_shifted_copies.at(0)); Geometry::chained_path(p, obj_idx); - std::vector z(100); // preallocate with 100 layers + std::vector z; + z.reserve(100); // preallocate with 100 layers std::map layers {}; for (size_t idx = 0U; idx < print.objects.size(); ++idx) { const auto& object {*(objects.at(idx))};