mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-17 05:15:42 -07:00
fixes: dangling pointer to an unnamed temporary may be used [-Wdangling-pointer=]
This commit is contained in:
parent
40e573aa67
commit
18aee83ca0
2 changed files with 3 additions and 3 deletions
|
|
@ -1182,8 +1182,8 @@ sla::DrainHoles SLAPrintObject::transformed_drainhole_points() const
|
|||
{
|
||||
assert(m_model_object != nullptr);
|
||||
auto pts = m_model_object->sla_drain_holes;
|
||||
auto tr = trafo().cast<float>();
|
||||
auto sc = m_model_object->instances.front()->get_scaling_factor().cast<float>();
|
||||
const auto tr = trafo().cast<float>();
|
||||
const Vec3f sc = m_model_object->instances.front()->get_scaling_factor().cast<float>();
|
||||
for (sla::DrainHole &hl : pts) {
|
||||
hl.pos = tr * hl.pos;
|
||||
hl.normal = tr * hl.normal - tr.translation();
|
||||
|
|
|
|||
|
|
@ -3166,7 +3166,7 @@ void Selection::paste_objects_from_clipboard()
|
|||
if (shift_all(0) != 0 || shift_all(1) != 0) {
|
||||
// BBS: if multiple objects are selected, move them as a whole after copy
|
||||
if (i == 0) empty_cell_all = wxGetApp().plater()->canvas3D()->get_nearest_empty_cell({start_point(0), start_point(1)}, {bbox.size()(0)+1,bbox.size()(1)+1});
|
||||
auto instance_shift = src_object->instances.front()->get_offset() - src_objects[0]->instances.front()->get_offset();
|
||||
const Vec3d instance_shift = src_object->instances.front()->get_offset() - src_objects[0]->instances.front()->get_offset();
|
||||
displacement = {shift_all.x() + empty_cell_all.x() + instance_shift.x(), shift_all.y() + empty_cell_all.y() + instance_shift.y(), start_offset(2)};
|
||||
} else {
|
||||
// BBS: if only one object is copied, find an empty cell to put it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue