avoid copy
This commit is contained in:
parent
c88a725a7d
commit
2ff8c3344e
1 changed files with 2 additions and 1 deletions
|
@ -224,13 +224,14 @@ public:
|
|||
|
||||
box2d<double> envelope() const
|
||||
{
|
||||
// TODO - cache this
|
||||
box2d<double> result;
|
||||
for (unsigned i=0;i<num_geometries();++i)
|
||||
{
|
||||
geometry_type const& geom = get_geometry(i);
|
||||
if (i==0)
|
||||
{
|
||||
box2d<double> box = geom.envelope();
|
||||
box2d<double> const& box = geom.envelope();
|
||||
result.init(box.minx(),box.miny(),box.maxx(),box.maxy());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue