]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music.cc
nitpicks
[lilypond.git] / lily / music.cc
index 1253e728603178c3d308e170597458adb87c2968..83f88fbcd91a06e66988d8c6f52b6de4264d5f2f 100644 (file)
@@ -16,7 +16,6 @@
 #include "ly-smobs.icc"
 #include "main.hh"
 #include "music-sequence.hh"
-#include "pitch.hh"
 #include "score.hh"
 #include "warn.hh"
 
@@ -139,7 +138,7 @@ Music::generic_to_relative_octave (Pitch last)
          Pitch expected_pit (scm_to_int (check),
                              new_pit.get_notename (),
                              new_pit.get_alteration ());
-         origin ()->warning (_f ("octave check failed; expected \"%s\", found: %s",
+         origin ()->warning (_f ("octave check failed; expected \"%s\", found: \"%s\"",
                                  expected_pit.to_string (),
                                  new_pit.to_string ()));
          new_pit = expected_pit;
@@ -185,7 +184,7 @@ Music::compress (Moment factor)
 }
 
 /*
-TODO: make transposition non-destructive
+  This mutates alist.  Hence, make sure that it is not changed 
 */
 SCM
 transpose_mutable (SCM alist, Pitch delta)
@@ -203,7 +202,7 @@ transpose_mutable (SCM alist, Pitch delta)
          Pitch transposed = p->transposed (delta);
          scm_set_cdr_x (entry, transposed.smobbed_copy ());
 
-         if (abs (transposed.get_alteration ()) > DOUBLE_SHARP)
+         if (transposed.get_alteration ().abs () > Rational (1,1))
            {
              warning (_f ("transposition by %s makes alteration larger than double",
                           delta.to_string ()));
@@ -218,7 +217,8 @@ transpose_mutable (SCM alist, Pitch delta)
        transpose_music_list (val, delta);
       else if (prop == ly_symbol2scm ("pitch-alist") &&
               scm_is_pair (val))
-       entry = scm_cons (prop, ly_transpose_key_alist (val, delta.smobbed_copy ()));
+       entry = scm_cons (prop,
+                         ly_transpose_key_alist (val, delta.smobbed_copy ()));
       retval = scm_cons (entry, retval);
     }