mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
unique_ptr instead of auto_ptr for C++11 and above
This commit is contained in:
parent
60ea0561ec
commit
fad91b86bd
2 changed files with 9 additions and 0 deletions
|
@ -162,7 +162,11 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// get filler object
|
// get filler object
|
||||||
|
#if SLIC3R_CPPVER >= 11
|
||||||
|
std::unique_ptr<Fill> f = std::unique_ptr<Fill>(Fill::new_from_type(fill_pattern));
|
||||||
|
#else
|
||||||
std::auto_ptr<Fill> f = std::auto_ptr<Fill>(Fill::new_from_type(fill_pattern));
|
std::auto_ptr<Fill> f = std::auto_ptr<Fill>(Fill::new_from_type(fill_pattern));
|
||||||
|
#endif
|
||||||
f->set_bounding_box(layerm.layer()->object()->bounding_box());
|
f->set_bounding_box(layerm.layer()->object()->bounding_box());
|
||||||
|
|
||||||
// calculate the actual flow we'll be using for this infill
|
// calculate the actual flow we'll be using for this infill
|
||||||
|
|
|
@ -1171,8 +1171,13 @@ void PrintObjectSupportMaterial::generate_toolpaths(
|
||||||
infill_pattern = ipHoneycomb;
|
infill_pattern = ipHoneycomb;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if SLIC3R_CPPVER >= 11
|
||||||
|
std::unique_ptr<Fill> filler_interface = std::unique_ptr<Fill>(Fill::new_from_type(ipRectilinear));
|
||||||
|
std::unique_ptr<Fill> filler_support = std::unique_ptr<Fill>(Fill::new_from_type(infill_pattern));
|
||||||
|
#else
|
||||||
std::auto_ptr<Fill> filler_interface = std::auto_ptr<Fill>(Fill::new_from_type(ipRectilinear));
|
std::auto_ptr<Fill> filler_interface = std::auto_ptr<Fill>(Fill::new_from_type(ipRectilinear));
|
||||||
std::auto_ptr<Fill> filler_support = std::auto_ptr<Fill>(Fill::new_from_type(infill_pattern));
|
std::auto_ptr<Fill> filler_support = std::auto_ptr<Fill>(Fill::new_from_type(infill_pattern));
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
BoundingBox bbox_object = object.bounding_box();
|
BoundingBox bbox_object = object.bounding_box();
|
||||||
filler_interface->set_bounding_box(bbox_object);
|
filler_interface->set_bounding_box(bbox_object);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue