diff options
author | bubnikv <bubnikv@gmail.com> | 2016-11-04 19:20:32 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-11-04 19:20:32 +0300 |
commit | 89cf29080b87c9d42bdeba060df1d85d5f79276b (patch) | |
tree | f249ac0dab5b9d648cbb558af9ad5651053ac7d0 | |
parent | 96a1c74d456a2c9c140c72899e179cb685224b96 (diff) |
Fix of https://github.com/prusa3d/Slic3r/issues/14
A to_polygons(SurfacePtrs &&) method does not make sense as
the ownership of the Surfaces stored in the pointer array is not known.
Thanks to @flannelhead for precisely pinpointing this issue.
-rw-r--r-- | xs/src/libslic3r/Surface.hpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/xs/src/libslic3r/Surface.hpp b/xs/src/libslic3r/Surface.hpp index 09bc3e5f5..d48b59557 100644 --- a/xs/src/libslic3r/Surface.hpp +++ b/xs/src/libslic3r/Surface.hpp @@ -96,24 +96,6 @@ inline Polygons to_polygons(const SurfacesPtr &src) return polygons; } -#if SLIC3R_CPPVER >= 11 -inline Polygons to_polygons(SurfacesPtr &&src) -{ - size_t num = 0; - for (SurfacesPtr::const_iterator it = src.begin(); it != src.end(); ++it) - num += (*it)->expolygon.holes.size() + 1; - Polygons polygons; - polygons.reserve(num); - for (SurfacesPtr::const_iterator it = src.begin(); it != src.end(); ++it) { - polygons.push_back(std::move((*it)->expolygon.contour)); - for (Polygons::const_iterator ith = (*it)->expolygon.holes.begin(); ith != (*it)->expolygon.holes.end(); ++ith) { - polygons.push_back(std::move(*ith)); - } - } - return polygons; -} -#endif - // Count a nuber of polygons stored inside the vector of expolygons. // Useful for allocating space for polygons when converting expolygons to polygons. inline size_t number_polygons(const Surfaces &surfaces) |