X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Farticulations.cc;h=334e4386828e6e0d2a86ace8dad0586b11f6565e;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=93018656a5e5c1cf38ec9c24fbefe54af08d400f;hpb=55ac733b69643a6bc6a83b706c65cb56efd388ef;p=lilypond.git diff --git a/lily/articulations.cc b/lily/articulations.cc index 93018656a5..334e438682 100644 --- a/lily/articulations.cc +++ b/lily/articulations.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2010--2011 Carl Sorensen + Copyright (C) 2010--2015 Carl Sorensen LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,10 +35,9 @@ SCM articulation_list (vector note_events, - vector articulation_events, - char const *articulation_name) + vector articulation_events, + char const *articulation_name) { - vector string_events; SCM articulations = SCM_EOL; vsize j = 0; @@ -50,36 +49,36 @@ articulation_list (vector note_events, Stream_event *articulation_event = 0; /* - For notes inside a chord construct, string indications are - stored as articulations on the note, so we check through - the notes + For notes inside a chord construct, string indications are + stored as articulations on the note, so we check through + the notes */ for (SCM s = event->get_property ("articulations"); - !articulation_event && scm_is_pair (s); s = scm_cdr (s)) - { - Stream_event *art = unsmob_stream_event (scm_car (s)); + !articulation_event && scm_is_pair (s); s = scm_cdr (s)) + { + Stream_event *art = unsmob (scm_car (s)); - if (art->in_event_class (articulation_name)) - articulation_event = art; - } + if (art->in_event_class (articulation_name)) + articulation_event = art; + } /* - For string indications listed outside a chord construct, - a string_number_event is generated, so if there was no string - in the articulations, we check for string events outside - the chord construct + For string indications listed outside a chord construct, + a string_number_event is generated, so if there was no string + in the articulations, we check for string events outside + the chord construct */ if (!articulation_event && j < articulation_events.size ()) - { - articulation_event = articulation_events[j]; - if (j + 1 < articulation_events.size ()) - j++; - } + { + articulation_event = articulation_events[j]; + if (j + 1 < articulation_events.size ()) + j++; + } articulations = scm_cons ((articulation_event - ? articulation_event->self_scm () - : SCM_EOL), - articulations); + ? articulation_event->self_scm () + : SCM_EOL), + articulations); } - return (scm_reverse (articulations)); + return scm_reverse_x (articulations, SCM_EOL); }