diff --git a/src/Lib/Geometry/line.cxx b/src/Lib/Geometry/line.cxx index 33ec091f..0d2f2b9b 100644 --- a/src/Lib/Geometry/line.cxx +++ b/src/Lib/Geometry/line.cxx @@ -48,7 +48,7 @@ Line::addPoint (const Point3D &point) _points.push_back(point); } -const Rectangle +Rectangle Line::getBounds () const { Point3D min; @@ -68,11 +68,9 @@ Line::getBounds () const if (_points[i].y() > max.y()) max.sety(_points[i].y()); } - return Rectangle(min, max); } - Rectangle bounds; - return bounds; + return Rectangle(min, max); } }; diff --git a/src/Lib/Geometry/line.hxx b/src/Lib/Geometry/line.hxx index 94f7b6fe..f28fe674 100644 --- a/src/Lib/Geometry/line.hxx +++ b/src/Lib/Geometry/line.hxx @@ -82,7 +82,7 @@ public: * * @return The bounding rectangle. */ - virtual const Rectangle getBounds () const; + virtual Rectangle getBounds () const; private: vector<Point3D> _points;