Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2019-10-03 16:13:17 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-10-03 16:13:17 +0300
commitfefde79c899074c22c6fabc8ac7981a34a10a15c (patch)
tree27d0271079060187ce766396b578bb4bb6156380 /src/libslic3r/SLA
parentc4d50ea639ed551aaf9557eb8c584dd4d84b5e38 (diff)
Make sure no vector reallocation will be performed on pillars.
This is a workaround for now, it needs to be handled properly.
Diffstat (limited to 'src/libslic3r/SLA')
-rw-r--r--src/libslic3r/SLA/SLASupportTreeBuilder.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libslic3r/SLA/SLASupportTreeBuilder.hpp b/src/libslic3r/SLA/SLASupportTreeBuilder.hpp
index 9a0036474..95fcdcc32 100644
--- a/src/libslic3r/SLA/SLASupportTreeBuilder.hpp
+++ b/src/libslic3r/SLA/SLASupportTreeBuilder.hpp
@@ -309,7 +309,7 @@ public:
{
std::lock_guard<Mutex> lk(m_mutex);
if (m_pillars.capacity() < m_heads.size())
- m_pillars.reserve(m_heads.size() * 2);
+ m_pillars.reserve(m_heads.size() * 10);
assert(headid >= 0 && headid < m_head_indices.size());
Head &head = m_heads[m_head_indices[size_t(headid)]];
@@ -360,7 +360,8 @@ public:
{
std::lock_guard<Mutex> lk(m_mutex);
if (m_pillars.capacity() < m_heads.size())
- m_pillars.reserve(m_heads.size() * 2);
+ m_pillars.reserve(m_heads.size() * 10);
+
m_pillars.emplace_back(std::forward<Args>(args)...);
Pillar& pillar = m_pillars.back();
pillar.id = long(m_pillars.size() - 1);