From ec83d7a39b8cb0ef50d17806ed61998a48b6e4f4 Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Mon, 11 Nov 2002 15:19:04 +0000
Subject: [PATCH] Julian Foad:

- Remove redundant "const" from return-by-value type.
- Rearrange function to avoid sometimes-unused variables (compiler warning).
---
 src/Lib/Geometry/line.cxx | 6 ++----
 src/Lib/Geometry/line.hxx | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

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;