]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4718/4: Fold transpose_mutable into Prob::transpose
authorDavid Kastrup <dak@gnu.org>
Sat, 27 Feb 2016 11:35:04 +0000 (12:35 +0100)
committerDavid Kastrup <dak@gnu.org>
Fri, 4 Mar 2016 11:36:35 +0000 (12:36 +0100)
It's not really needed elsewhere anymore.

lily/include/music.hh
lily/music.cc

index bf9cf2d7ea0a47d46633460aa912f45624ba8f51..c904dc3347fa457ad469aa04ad736a679a3dd835 100644 (file)
@@ -74,7 +74,4 @@ SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
 
 extern SCM ly_music_p_proc;
 
-/* common transposition function for music and event */
-void transpose_mutable (SCM alist, Pitch delta);
-
 #endif /* MUSIC_HH */
index 5e646f5b9583ea7af1112b6119e886c587506210..bbf7fe4f585da5c8ed909088627346767bb1971d 100644 (file)
@@ -198,10 +198,14 @@ Music::compress (Moment factor)
 /*
   This mutates alist.  Hence, make sure that it is not shared
 */
+
 void
-transpose_mutable (SCM alist, Pitch delta)
+Prob::transpose (Pitch delta)
 {
-  for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
+  if (to_boolean (get_property ("untransposable")))
+    return;
+
+  for (SCM s = mutable_property_alist_; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM entry = scm_car (s);
       SCM prop = scm_car (entry);
@@ -235,15 +239,6 @@ transpose_mutable (SCM alist, Pitch delta)
     }
 }
 
-void
-Prob::transpose (Pitch delta)
-{
-  if (to_boolean (get_property ("untransposable")))
-    return;
-
-  transpose_mutable (mutable_property_alist_, delta);
-}
-
 void
 Music::set_spot (Input ip)
 {