Julian Foad:
- Remove redundant "const" from return-by-value type. - Rearrange function to avoid sometimes-unused variables (compiler warning).
This commit is contained in:
parent
c76dff0abf
commit
ec83d7a39b
2 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
*
|
||||
* @return The bounding rectangle.
|
||||
*/
|
||||
virtual const Rectangle getBounds () const;
|
||||
virtual Rectangle getBounds () const;
|
||||
|
||||
private:
|
||||
vector<Point3D> _points;
|
||||
|
|
Loading…
Add table
Reference in a new issue