Skyline const *padded_this = this;
Skyline const *padded_other = &other;
+ bool created_tmp_skylines = false;
/*
For systems, padding is not added at creation time. Padding is
{
padded_this = new Skyline (*padded_this, horizon_padding, X_AXIS);
padded_other = new Skyline (*padded_other, horizon_padding, X_AXIS);
+ created_tmp_skylines = true;
}
list<Building>::const_iterator i = padded_this->buildings_.begin ();
j++;
start = end;
}
+
+ if (created_tmp_skylines)
+ {
+ delete padded_this;
+ delete padded_other;
+ }
+
return dist;
}