]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/skyline.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / skyline.cc
index f8515758421f3d9397d56d818e66dc37e22a09ab..6ef2069c39b50b0acb7273c06928c3e509cf4729 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2014 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2015 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -802,7 +802,7 @@ Skyline::clear ()
 
 /****************************************************************/
 
-const char Skyline::type_p_name_[] = "ly:skyline?";
+const char * const Skyline::type_p_name_ = "ly:skyline?";
 
 MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Skyline, get_touching_point, 3, 1, "")
 SCM
@@ -811,14 +811,14 @@ Skyline::get_touching_point (SCM skyline_scm, SCM other_skyline_scm, SCM horizon
   LY_ASSERT_SMOB (Skyline, other_skyline_scm, 1);
 
   Real horizon_padding = 0;
-  if (horizon_padding_scm != SCM_UNDEFINED)
+  if (!SCM_UNBNDP (horizon_padding_scm))
     {
       LY_ASSERT_TYPE (scm_is_number, horizon_padding_scm, 3);
       horizon_padding = scm_to_double (horizon_padding_scm);
     }
 
-  Skyline *skyline = Skyline::unsmob (skyline_scm);
-  Skyline *other_skyline = Skyline::unsmob (other_skyline_scm);
+  Skyline *skyline = unsmob<Skyline> (skyline_scm);
+  Skyline *other_skyline = unsmob<Skyline> (other_skyline_scm);
   return scm_from_double (skyline->touching_point (*other_skyline, horizon_padding));
 }
 
@@ -829,14 +829,14 @@ Skyline::get_distance (SCM skyline_scm, SCM other_skyline_scm, SCM horizon_paddi
   LY_ASSERT_SMOB (Skyline, other_skyline_scm, 1);
 
   Real horizon_padding = 0;
-  if (horizon_padding_scm != SCM_UNDEFINED)
+  if (!SCM_UNBNDP (horizon_padding_scm))
     {
       LY_ASSERT_TYPE (scm_is_number, horizon_padding_scm, 3);
       horizon_padding = scm_to_double (horizon_padding_scm);
     }
 
-  Skyline *skyline = Skyline::unsmob (skyline_scm);
-  Skyline *other_skyline = Skyline::unsmob (other_skyline_scm);
+  Skyline *skyline = unsmob<Skyline> (skyline_scm);
+  Skyline *other_skyline = unsmob<Skyline> (other_skyline_scm);
   return scm_from_double (skyline->distance (*other_skyline, horizon_padding));
 }
 
@@ -844,14 +844,14 @@ MAKE_SCHEME_CALLBACK (Skyline, get_max_height, 1)
 SCM
 Skyline::get_max_height (SCM skyline_scm)
 {
-  return scm_from_double (Skyline::unsmob (skyline_scm)->max_height ());
+  return scm_from_double (unsmob<Skyline> (skyline_scm)->max_height ());
 }
 
 MAKE_SCHEME_CALLBACK (Skyline, get_max_height_position, 1)
 SCM
 Skyline::get_max_height_position (SCM skyline_scm)
 {
-  return scm_from_double (Skyline::unsmob (skyline_scm)->max_height_position ());
+  return scm_from_double (unsmob<Skyline> (skyline_scm)->max_height_position ());
 }
 
 MAKE_SCHEME_CALLBACK (Skyline, get_height, 2)
@@ -859,14 +859,14 @@ SCM
 Skyline::get_height (SCM skyline_scm, SCM x_scm)
 {
   Real x = robust_scm2double (x_scm, 0.0);
-  return scm_from_double (Skyline::unsmob (skyline_scm)->height (x));
+  return scm_from_double (unsmob<Skyline> (skyline_scm)->height (x));
 }
 
 LY_DEFINE (ly_skyline_empty_p, "ly:skyline-empty?",
            1, 0, 0, (SCM sky),
            "Return whether @var{sky} is empty.")
 {
-  Skyline *s = Skyline::unsmob (sky);
+  Skyline *s = unsmob<Skyline> (sky);
   LY_ASSERT_SMOB (Skyline, sky, 1);
   return scm_from_bool (s->is_empty ());
 }