]> git.donarmstrong.com Git - lilypond.git/commitdiff
nitpicks: remove unused var, better error message for unknown alterations.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 30 Dec 2006 02:08:34 +0000 (03:08 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 30 Dec 2006 02:08:34 +0000 (03:08 +0100)
lily/accidental-engraver.cc
lily/accidental.cc

index 1b9920673f354b4e973dc6001e190d523e030627..074d668bab18ea4d163fa929d3a1495755347154 100644 (file)
@@ -368,8 +368,6 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
 {
   Stream_event *note = entry->melodic_;
   Grob *support = entry->head_;
-  Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
-
   bool as_suggestion = to_boolean (entry->origin_->get_property ("suggestAccidentals"));
   Grob *a = 0;
   if (as_suggestion)
index 6b7c85ada750ad84cc6ecd0d9d2e9ced4d81c0b7..a54a87efbc3c31e6cf07f1af9902038122439d10 100644 (file)
@@ -130,12 +130,13 @@ Accidental_interface::print (SCM smob)
   Font_metric *fm = Font_interface::get_default_font (me);
 
   SCM alist = me->get_property ("glyph-name-alist");
-  SCM glyph_name = ly_assoc_get (me->get_property ("alteration"),
-                                alist, SCM_BOOL_F);
+  SCM alt = me->get_property ("alteration");
+  SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F);
   
   if (!scm_is_string (glyph_name))
     {
-      me->warning ("Could not find glyph-name for alteration");
+      me->warning (_f ("Could not find glyph-name for alteration %s",
+                      ly_scm2rational (alt).to_string ().c_str ()));
       return SCM_EOL;
     }