From 2606faf48590c90bd488a8944c7612acef11ed8c Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 27 Feb 2016 12:35:04 +0100 Subject: [PATCH] Issue 4718/4: Fold transpose_mutable into Prob::transpose It's not really needed elsewhere anymore. --- lily/include/music.hh | 3 --- lily/music.cc | 17 ++++++----------- 2 files changed, 6 insertions(+), 14 deletions(-) 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) { -- 2.39.5