]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.64
authorfred <fred>
Tue, 26 Mar 2002 23:23:32 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:32 +0000 (23:23 +0000)
lily/include/hyphen-spanner.hh
lily/include/spanner.hh
lily/spanner.cc

index c185c64e962f76d21fd1d8e5109486943b3d8846..e8947a42091f5b1b73b26a827efc0f75f0dbcef8 100644 (file)
@@ -23,7 +23,7 @@ struct Hyphen_spanner // interface
 public:
   Spanner* elt_l_;
   Hyphen_spanner  (Spanner*);
-  void set_textitem (Direction, Item*);
+  void set_textitem (Direction, Score_element*);
   static SCM brew_molecule (SCM);
 };
 
index 2eb457e514a7b452d455c228d1f999495125a50e..9fb7f0bed6e5054cacede858a7f752f31f3e91c6 100644 (file)
@@ -37,7 +37,7 @@ public:
 
   // TODO: make virtual and do this for Items as well.
   Interval_t<int> spanned_rank_iv ();
-  void set_bound (Direction d, Item*);
+  void set_bound (Direction d, Score_element*);
   Item *get_bound (Direction d) const;
   
   Spanner (SCM);
index c620ab64a32b19a72d291d557e2e616342e86617..711eaddf41d3f19d3d02d2a71bec4ebfc0ce866f 100644 (file)
@@ -157,8 +157,15 @@ Spanner::get_bound (Direction d) const
 }
 
 void
-Spanner::set_bound(Direction d, Item*i)
+Spanner::set_bound(Direction d, Score_element*s)
 {
+  Item * i = dynamic_cast<Item*> (s);
+  if (!i)
+    {
+      programming_error ("Must have Item for spanner bound.");
+      return;
+    }
+  
   spanned_drul_[d] =i;
 
   /**