X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frelative-octave-music.cc;h=fde9c2f8351155f1ec1e1f4abf8392d1f1764e28;hb=c2d44e3a71b2d031305abede97a53f6e5fcf832b;hp=15c9c54566945626afad332e67501100e3069d49;hpb=237583408aaf3b2192c388c3183d9c57fb051bd0;p=lilypond.git diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index 15c9c54566..fde9c2f835 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -3,13 +3,12 @@ source file of the GNU LilyPond music typesetter - (c) 1998--2003 Han-Wen Nienhuys + (c) 1998--2004 Han-Wen Nienhuys */ - #include "relative-music.hh" #include "warn.hh" - +#include "scm-option.hh" Pitch @@ -17,17 +16,15 @@ Relative_octave_music::to_relative_octave (Pitch p) { if (lily_1_8_relative) { - - /* - ugh: last-pitch should be junked. - - Change this for lilypond 2.0. When you do, - then B should start where A left off. + lily_1_8_compatibility_used = true; + /* last-pitch should be junked some time, when + we ditch 1.8 compat too. - \relative { A \relative { ...} B } + When you do, B should start where A left off. - */ - return * unsmob_pitch (get_mus_property ("last-pitch")); + \relative { A \relative { ...} B } */ + Pitch *ptr = unsmob_pitch (get_property ("last-pitch")); + return (ptr) ? *ptr : p; } else return p; @@ -39,3 +36,5 @@ Relative_octave_music::Relative_octave_music () } ADD_MUSIC (Relative_octave_music); + +