]> git.donarmstrong.com Git - lilypond.git/commitdiff
Replaces broken_spanner_index by get_break_index in spanner.cc
authorMike Solomon <mike@apollinemike.com>
Sat, 12 Mar 2011 18:02:27 +0000 (19:02 +0100)
committerMike Solomon <mike@apollinemike.com>
Sat, 12 Mar 2011 18:02:27 +0000 (19:02 +0100)
Deletes the broken_spanner_index function, which did the same thing.

lily/include/spanner.hh
lily/spanner.cc

index 43468754edb5077d7e4973021a50f3b6fb5fe2b2..e0f461a7dbc137acd7bf015cbf4984ea36dbba90 100644 (file)
@@ -93,5 +93,4 @@ protected:
 void add_bound_item (Spanner *, Grob *);
 
 bool spanner_less (Spanner *s1, Spanner *s2);
-int broken_spanner_index (Spanner const *sp);
 #endif
index f3d13c84f9879a5878a6dc9739528842b94e8205..6083c67461ecc110fcd681959d57e8859fb8175d 100644 (file)
@@ -273,7 +273,7 @@ Spanner::broken_neighbor (Direction d) const
   if (!original_)
     return 0;
 
-  vsize k = broken_spanner_index (this);
+  vsize k = get_break_index ();
   Spanner *orig = dynamic_cast<Spanner*> (original_);
   int j = int (k) + d;
   if (j < 0 || vsize (j) >= orig->broken_intos_.size ())
@@ -398,17 +398,6 @@ Spanner::set_spacing_rods (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
-/*
-  Return I such that SP == SP->ORIGINAL ()->BROKEN_INTOS_[I].
-*/
-int
-broken_spanner_index (Spanner const *sp)
-{
-  Spanner *parent = dynamic_cast<Spanner *> (sp->original ());
-  /* ugh: casting */
-  return find (parent->broken_intos_, (Spanner*) sp) - parent->broken_intos_.begin ();
-}
-
 Spanner *
 unsmob_spanner (SCM s)
 {