The same vector is constructed twice, so just do it once.
---
Not sure if this is the right place to send patches, but here it is.
lily/beam.cc | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lily/beam.cc b/lily/beam.cc
index 340d9fe1a1..dbb9c186c5 100644
--- a/lily/beam.cc
+++ b/lily/beam.cc
@@ -880,8 +880,6 @@ Beam::consider_auto_knees (Grob *me)
if (!scm_is_number (scm))
return;
- vector<Interval> forbidden_intervals;
-
extract_grob_set (me, "normal-stems", stems);
Grob *common = common_refpoint_of_array (stems, me, Y_AXIS);
@@ -913,15 +911,13 @@ Beam::consider_auto_knees (Grob *me)
}
}
head_extents_array.push_back (head_extents);
-
- forbidden_intervals.push_back (head_extents);
}
Interval max_gap;
Real max_gap_len = 0.0;
vector<Interval> allowed_regions
- = Interval_set::interval_union (forbidden_intervals).complement
().intervals ();
+ = Interval_set::interval_union (head_extents_array).complement
().intervals ();
for (vsize i = allowed_regions.size () - 1; i != VPOS; i--)
{
Interval gap = allowed_regions[i];