]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam-engraver.cc
Issue 4550 (2/2) Avoid "using namespace std;" in included files
[lilypond.git] / lily / beam-engraver.cc
index 9ab1d998478fc58544b8617967ea541c9f2c61ec..753a05644922e72f453bd14d2aef5b02e9b4f4a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1998--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1998--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -248,7 +248,7 @@ Beam_engraver::acknowledge_rest (Grob_info info)
   if (beam_
       && !scm_is_number (info.grob ()->get_property_data ("staff-position")))
     chain_offset_callback (info.grob (),
-                           ly_make_unpure_pure_container
+                           Unpure_pure_container::make_smob
                              (Beam::rest_collision_callback_proc,
                               Beam::pure_rest_collision_callback_proc),
                            Y_AXIS);
@@ -285,9 +285,9 @@ Beam_engraver::acknowledge_stem (Grob_info info)
 
   last_stem_added_at_ = now;
 
-  Duration *stem_duration = Duration::unsmob (ev->get_property ("duration"));
+  Duration *stem_duration = unsmob<Duration> (ev->get_property ("duration"));
   int durlog = stem_duration->duration_log ();
-  //int durlog = Duration::unsmob (ev->get_property ("duration"))->duration_log ();
+  //int durlog = unsmob<Duration> (ev->get_property ("duration"))->duration_log ();
   if (durlog <= 2)
     {
       ev->origin ()->warning (_ ("stem does not fit in beam"));
@@ -305,10 +305,10 @@ Beam_engraver::acknowledge_stem (Grob_info info)
   stem->set_property ("duration-log", scm_from_int (durlog));
   Moment stem_location = now - beam_start_mom_ + beam_start_location_;
   beam_info_->add_stem (stem_location,
-                        max (durlog - 2, 0),
+                        std::max (durlog - 2, 0),
                         Stem::is_invisible (stem),
                         stem_duration->factor (),
-                        (stem->get_property ("tuplet-start") == SCM_BOOL_T));
+                        (to_boolean (stem->get_property ("tuplet-start"))));
   Beam::add_stem (beam_, stem);
 }