From fad91b86bdb1c184611299b585813924b3942c5f Mon Sep 17 00:00:00 2001 From: Sakari Kapanen Date: Thu, 3 Nov 2016 08:18:27 +0200 Subject: [PATCH] unique_ptr instead of auto_ptr for C++11 and above --- xs/src/libslic3r/Fill/Fill.cpp | 4 ++++ xs/src/libslic3r/SupportMaterial.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/xs/src/libslic3r/Fill/Fill.cpp b/xs/src/libslic3r/Fill/Fill.cpp index 568d060128d..940ff4f25bb 100644 --- a/xs/src/libslic3r/Fill/Fill.cpp +++ b/xs/src/libslic3r/Fill/Fill.cpp @@ -162,7 +162,11 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) continue; // get filler object +#if SLIC3R_CPPVER >= 11 + std::unique_ptr f = std::unique_ptr(Fill::new_from_type(fill_pattern)); +#else std::auto_ptr f = std::auto_ptr(Fill::new_from_type(fill_pattern)); +#endif f->set_bounding_box(layerm.layer()->object()->bounding_box()); // calculate the actual flow we'll be using for this infill diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp index 80b3cb1011d..701e117993b 100644 --- a/xs/src/libslic3r/SupportMaterial.cpp +++ b/xs/src/libslic3r/SupportMaterial.cpp @@ -1171,8 +1171,13 @@ void PrintObjectSupportMaterial::generate_toolpaths( infill_pattern = ipHoneycomb; break; } +#if SLIC3R_CPPVER >= 11 + std::unique_ptr filler_interface = std::unique_ptr(Fill::new_from_type(ipRectilinear)); + std::unique_ptr filler_support = std::unique_ptr(Fill::new_from_type(infill_pattern)); +#else std::auto_ptr filler_interface = std::auto_ptr(Fill::new_from_type(ipRectilinear)); std::auto_ptr filler_support = std::auto_ptr(Fill::new_from_type(infill_pattern)); +#endif { BoundingBox bbox_object = object.bounding_box(); filler_interface->set_bounding_box(bbox_object);