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
path: root/xs
diff options
context:
space:
mode:
authorSakari Kapanen <sakari.m.kapanen@gmail.com>2016-11-03 09:18:27 +0300
committerSakari Kapanen <sakari.m.kapanen@gmail.com>2016-11-03 09:18:27 +0300
commitfad91b86bdb1c184611299b585813924b3942c5f (patch)
treee571496d4490b660597cbc363200fdcd56de0704 /xs
parent60ea0561ec901cde0b1a73cdf1f7a2d4b83704f3 (diff)
unique_ptr instead of auto_ptr for C++11 and above
Diffstat (limited to 'xs')
-rw-r--r--xs/src/libslic3r/Fill/Fill.cpp4
-rw-r--r--xs/src/libslic3r/SupportMaterial.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Fill/Fill.cpp b/xs/src/libslic3r/Fill/Fill.cpp
index 568d06012..940ff4f25 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<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));
+#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 80b3cb101..701e11799 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<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_support = std::auto_ptr<Fill>(Fill::new_from_type(infill_pattern));
+#endif
{
BoundingBox bbox_object = object.bounding_box();
filler_interface->set_bounding_box(bbox_object);