]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/completion-note-heads-engraver.cc
Doc: CG - replace references of Google Code with Sourceforge Allura
[lilypond.git] / lily / completion-note-heads-engraver.cc
index 27d950b690ecbd4f8aff608bc0f3aa33946df4aa..34a985d32da3cd1b16f2dda5e7bb2ff5a93fd5b2 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <cctype>
+using namespace std;
 
 #include "dot-column.hh"
 #include "dots.hh"
@@ -38,8 +39,6 @@
 
 #include "translator.icc"
 
-using std::vector;
-
 /*
   How does this work?
 
@@ -100,7 +99,7 @@ Completion_heads_engraver::listen_note (Stream_event *ev)
   Moment now = now_mom ();
   Moment musiclen = get_event_length (ev, now);
 
-  note_end_mom_ = std::max (note_end_mom_, (now + musiclen));
+  note_end_mom_ = max (note_end_mom_, (now + musiclen));
   do_nothing_until_ = Rational (0, 0);
 }
 
@@ -165,7 +164,7 @@ Completion_heads_engraver::make_note_head (Stream_event *ev)
   Item *note = make_item ("NoteHead", ev->self_scm ());
   Pitch *pit = unsmob<Pitch> (ev->get_property ("pitch"));
 
-  int pos = pit->steps ();
+  int pos = pit ? pit->steps () : 0;
   SCM c0 = get_property ("middleCPosition");
   if (scm_is_number (c0))
     pos += scm_to_int (c0);