Fixed several std::moves that had no effect, moved GCode data to heap
This commit is contained in:
parent
96a6c8538f
commit
e01d32d01a
7 changed files with 19 additions and 19 deletions
|
@ -58,11 +58,11 @@ public:
|
|||
thickness(rhs.thickness), thickness_layers(rhs.thickness_layers),
|
||||
bridge_angle(rhs.bridge_angle), extra_perimeters(rhs.extra_perimeters)
|
||||
{};
|
||||
Surface(SurfaceType _surface_type, const ExPolygon &&_expolygon)
|
||||
Surface(SurfaceType _surface_type, ExPolygon &&_expolygon)
|
||||
: surface_type(_surface_type), expolygon(std::move(_expolygon)),
|
||||
thickness(-1), thickness_layers(1), bridge_angle(-1), extra_perimeters(0)
|
||||
{};
|
||||
Surface(const Surface &other, const ExPolygon &&_expolygon)
|
||||
Surface(const Surface &other, ExPolygon &&_expolygon)
|
||||
: surface_type(other.surface_type), expolygon(std::move(_expolygon)),
|
||||
thickness(other.thickness), thickness_layers(other.thickness_layers),
|
||||
bridge_angle(other.bridge_angle), extra_perimeters(other.extra_perimeters)
|
||||
|
@ -159,7 +159,7 @@ inline ExPolygons to_expolygons(Surfaces &&src)
|
|||
{
|
||||
ExPolygons expolygons;
|
||||
expolygons.reserve(src.size());
|
||||
for (Surfaces::const_iterator it = src.begin(); it != src.end(); ++it)
|
||||
for (auto it = src.begin(); it != src.end(); ++it)
|
||||
expolygons.emplace_back(ExPolygon(std::move(it->expolygon)));
|
||||
src.clear();
|
||||
return expolygons;
|
||||
|
@ -260,8 +260,8 @@ inline void surfaces_append(Surfaces &dst, ExPolygons &&src, SurfaceType surface
|
|||
inline void surfaces_append(Surfaces &dst, ExPolygons &&src, const Surface &surfaceTempl)
|
||||
{
|
||||
dst.reserve(dst.size() + number_polygons(src));
|
||||
for (ExPolygons::const_iterator it = src.begin(); it != src.end(); ++ it)
|
||||
dst.emplace_back(Surface(surfaceTempl, std::move(*it)));
|
||||
for (ExPolygon& explg : src)
|
||||
dst.emplace_back(Surface(surfaceTempl, std::move(explg)));
|
||||
src.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue