From: David Kastrup Date: Sat, 27 Feb 2016 11:35:04 +0000 (+0100) Subject: Issue 4718/4: Fold transpose_mutable into Prob::transpose X-Git-Tag: release/2.19.38-1~17^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2606faf48590c90bd488a8944c7612acef11ed8c;p=lilypond.git Issue 4718/4: Fold transpose_mutable into Prob::transpose It's not really needed elsewhere anymore. --- diff --git a/lily/include/music.hh b/lily/include/music.hh index bf9cf2d7ea..c904dc3347 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -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 */ diff --git a/lily/music.cc b/lily/music.cc index 5e646f5b95..bbf7fe4f58 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -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) {