Return objects by reference instead of always cloning

This commit is contained in:
Alessandro Ranellucci 2013-09-02 20:22:20 +02:00
parent 1741301973
commit c0789506e4
30 changed files with 158 additions and 54 deletions

View file

@ -5,9 +5,7 @@ namespace Slic3r {
PolylineCollection*
PolylineCollection::chained_path(bool no_reverse) const
{
if (this->polylines.empty()) {
return new PolylineCollection ();
}
if (this->polylines.empty()) return new PolylineCollection ();
return this->chained_path_from(this->polylines.front().first_point(), no_reverse);
}