]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/gregorian-ligature-engraver.cc
Release: bump Welcome versions.
[lilypond.git] / lily / gregorian-ligature-engraver.cc
index 30ac2728dc088da09f45db7dafcbb67fff96f2c6..ad8b423eb58ec4d51d74b350369601067d35bf99 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2003--2011 Juergen Reuter <reuter@ipd.uka.de>
+  Copyright (C) 2003--2015 Juergen Reuter <reuter@ipd.uka.de>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -42,7 +42,8 @@
  * engravers for Gregorian chant will be added in the future, such as
  * Medicaea_ligature_engraver or Hufnagel_ligature_engraver.
  */
-Gregorian_ligature_engraver::Gregorian_ligature_engraver ()
+Gregorian_ligature_engraver::Gregorian_ligature_engraver (Context *c)
+  : Coherent_ligature_engraver (c)
 {
   pes_or_flexa_req_ = 0;
 }
@@ -93,7 +94,7 @@ void fix_prefix_set (int *current_set, int min_set, int max_set, Grob *primitive
   fix_prefix ("pes_or_flexa", LINEA, current_set, min_set, max_set, primitive);
 }
 
-void check_and_fix_all_prefixes (vector<Grob_info> primitives)
+void check_and_fix_all_prefixes (vector<Grob_info> const &primitives)
 {
   /* Check for invalid head modifier combinations */
   for (vsize i = 0; i < primitives.size (); i++)
@@ -204,7 +205,7 @@ void check_and_fix_all_prefixes (vector<Grob_info> primitives)
  * Marks those heads that participate in a pes or flexa.
  */
 void
-provide_context_info (vector<Grob_info> primitives)
+provide_context_info (vector<Grob_info> const &primitives)
 {
   Grob *prev_primitive = 0;
   int prev_prefix_set = 0;
@@ -215,7 +216,7 @@ provide_context_info (vector<Grob_info> primitives)
       Grob *primitive = primitives[i].grob ();
       Stream_event *event_cause = primitives[i].event_cause ();
       int context_info = 0;
-      int pitch = unsmob_pitch (event_cause->get_property ("pitch"))->steps ();
+      int pitch = unsmob<Pitch> (event_cause->get_property ("pitch"))->steps ();
       int prefix_set = scm_to_int (primitive->get_property ("prefix-set"));
 
       if (prefix_set & PES_OR_FLEXA)
@@ -253,7 +254,7 @@ provide_context_info (vector<Grob_info> primitives)
 
 void
 Gregorian_ligature_engraver::build_ligature (Spanner *ligature,
-                                             vector<Grob_info> primitives)
+                                             vector<Grob_info> const &primitives)
 {
   // apply style-independent checking and transformation
   check_and_fix_all_prefixes (primitives);