]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vaticana-ligature-engraver.cc
(descend-to-context, context-spec-music): optional arguments id mods
[lilypond.git] / lily / vaticana-ligature-engraver.cc
index 9b1485777c962ecbfa0f89a731e036211afb3218..36959d0518b28f59c8a8d833a0a2be24ce4ec441 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2003--2012 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
@@ -35,6 +35,9 @@
 #include "pitch.hh"
 #include "translator.icc"
 
+using std::string;
+using std::vector;
+
 /*
  * This class implements the notation specific aspects of Vaticana
  * style ligatures for Gregorian chant notation.
@@ -247,7 +250,7 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> const &primitives,
        */
 
       SCM glyph_name_scm = primitive->get_property ("glyph-name");
-      if (glyph_name_scm == SCM_EOL)
+      if (scm_is_null (glyph_name_scm))
         {
           primitive->programming_error ("Vaticana_ligature:"
                                         " undefined glyph-name ->"
@@ -260,7 +263,7 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> const &primitives,
       if (prev_primitive) /* urgh, need prev_primitive only here */
         {
           SCM delta_pitch_scm = prev_primitive->get_property ("delta-position");
-          if (delta_pitch_scm != SCM_EOL)
+          if (!scm_is_null (delta_pitch_scm))
             delta_pitch = scm_to_int (delta_pitch_scm);
           else
             {
@@ -455,11 +458,11 @@ Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive)
   // bitmask based O (1) test); where n=<number of primitives in the
   // ligature> (which is typically small (n<10), though).
   Stream_event *new_cause = primitive.event_cause ();
-  int new_pitch = unsmob_pitch (new_cause->get_property ("pitch"))->steps ();
+  int new_pitch = unsmob<Pitch> (new_cause->get_property ("pitch"))->steps ();
   for (vsize i = 0; i < augmented_primitives_.size (); i++)
     {
       Stream_event *cause = augmented_primitives_[i].event_cause ();
-      int pitch = unsmob_pitch (cause->get_property ("pitch"))->steps ();
+      int pitch = unsmob<Pitch> (cause->get_property ("pitch"))->steps ();
       if (pitch == new_pitch)
         {
           primitive.grob ()->
@@ -491,7 +494,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 
       int delta_pitch;
       SCM delta_pitch_scm = primitive->get_property ("delta-position");
-      if (delta_pitch_scm != SCM_EOL)
+      if (!scm_is_null (delta_pitch_scm))
         delta_pitch = scm_to_int (delta_pitch_scm);
       else
         {
@@ -729,7 +732,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
   add_mora_column (prev_primitive->get_column ());
 
 #if 0 // experimental code to collapse spacing after ligature
-  /* TODO: set to max (old/new spacing-increment), since other
+  /* TODO: set to std::max (old/new spacing-increment), since other
      voices/staves also may want to set this property. */
   Item *first_primitive = dynamic_cast<Item *> (primitives[0].grob ());
   Paper_column *paper_column = first_primitive->get_column ();