mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-04 14:15:16 +08:00
Fixed an libligl AABB assignment operator: memory aligned structures
shall not be passed as "by value" parameters. This is explicitely warned against in the Eigen manual: https://eigen.tuxfamily.org/dox/group__TopicPassingByValue.html
This commit is contained in:
parent
52c9dd3252
commit
f55ddbb1e3
@ -68,10 +68,13 @@ public:
|
|||||||
//swap(first.m_low_sqr_d,second.m_low_sqr_d);
|
//swap(first.m_low_sqr_d,second.m_low_sqr_d);
|
||||||
//swap(first.m_depth,second.m_depth);
|
//swap(first.m_depth,second.m_depth);
|
||||||
}
|
}
|
||||||
// Pass-by-value (aka copy)
|
AABB& operator=(const AABB &other)
|
||||||
AABB& operator=(AABB other)
|
|
||||||
{
|
{
|
||||||
swap(*this,other);
|
this->deinit();
|
||||||
|
m_left = other.m_left ? new AABB(*other.m_left) : NULL;
|
||||||
|
m_right = other.m_right ? new AABB(*other.m_right) : NULL;
|
||||||
|
m_box = other.m_box;
|
||||||
|
m_primitive = other.m_primitive;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
AABB(AABB&& other):
|
AABB(AABB&& other):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user