]> git.donarmstrong.com Git - lilypond.git/commitdiff
side-position-interface: do not recursively add support
authorKeith OHara <k-ohara5a5a@oco.net>
Wed, 21 Aug 2013 20:51:49 +0000 (13:51 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Tue, 27 Aug 2013 17:50:49 +0000 (10:50 -0700)
Also remove the call to remove_duplicates() on every addition to a
support list.  Reversing unwanted changes from commit 7d3d28d

lily/pointer-group-interface.cc
lily/script-column.cc
lily/side-position-interface.cc

index 79888348f9ce48a7fe7e69445924434941f8a2e8..045563d457b9acd572a203788fb5dea3d4dab336 100644 (file)
@@ -68,19 +68,11 @@ Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (Grob *))
   return 0;
 }
 
-// If the grob array is unordered, we assume that duplicates should
-// be removed. This makes sense for things like side-position-elements,
-// which may be added recursively numerous times and thus will eat up
-// computation time when skylines are calculated.
-// If the array is ordered, then we don't remove duplicates.
-
 void
 Pointer_group_interface::add_grob (Grob *me, SCM sym, Grob *p)
 {
   Grob_array *arr = get_grob_array (me, sym);
   arr->add (p);
-  if (!arr->ordered ())
-    arr->remove_duplicates ();
 }
 
 void
@@ -89,7 +81,6 @@ Pointer_group_interface::add_unordered_grob (Grob *me, SCM sym, Grob *p)
   Grob_array *arr = get_grob_array (me, sym);
   arr->add (p);
   arr->set_ordered (false);
-  arr->remove_duplicates ();
 }
 
 static vector<Grob *> empty_array;
index d0486ea4aa1efbe52d52a57f53048749da435dd0..0a014a38008bb3e57aafb92a3671aa90b0c8ac95 100644 (file)
@@ -156,7 +156,7 @@ Script_column::order_grobs (vector<Grob *> grobs)
                 use it as a support for the current grob
               */
               if (!scm_is_number (last_outside_staff))
-                Side_position_interface::recursive_add_support (g, last);
+                Side_position_interface::add_support (g, last);
               /*
                 if outside_staff_priority is missing or is equal to original
                 outside_staff_priority of previous grob, set new
index 07076d32c3ff452625e844629d31af387fca98f1..998813a0ec7199d93d284dbe4236a9ebd6d3664e 100644 (file)
@@ -54,15 +54,6 @@ Side_position_interface::add_support (Grob *me, Grob *e)
   Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("side-support-elements"), e);
 }
 
-void
-Side_position_interface::recursive_add_support (Grob *me, Grob *e)
-{
-  Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("side-support-elements"), e);
-  extract_grob_set (e, "side-support-elements", sse);
-  for (vsize i = 0; i < sse.size (); i++)
-    recursive_add_support (me, sse[i]);
-}
-
 set<Grob *>
 get_support_set (Grob *me)
 {