From e1f8483b97ecfcced38c573a2596c0d300deef4e Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Sat, 12 Mar 2011 19:02:27 +0100 Subject: [PATCH] Replaces broken_spanner_index by get_break_index in spanner.cc Deletes the broken_spanner_index function, which did the same thing. --- lily/include/spanner.hh | 1 - lily/spanner.cc | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 43468754ed..e0f461a7db 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -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 diff --git a/lily/spanner.cc b/lily/spanner.cc index f3d13c84f9..6083c67461 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -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 (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 (sp->original ()); - /* ugh: casting */ - return find (parent->broken_intos_, (Spanner*) sp) - parent->broken_intos_.begin (); -} - Spanner * unsmob_spanner (SCM s) { -- 2.39.5