]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spanner.cc
Issue 4550 (1/2) Avoid "using namespace std;" in included files
[lilypond.git] / lily / spanner.cc
index 84752313213c5df7c3c8ff6e03473cae3e8c1e53..c01ac14165eebbd16ea6f47557338d2e59c78cc4 100644 (file)
@@ -26,6 +26,8 @@
 #include "system.hh"
 #include "warn.hh"
 
+using std::vector;
+
 Grob *
 Spanner::clone () const
 {
@@ -210,7 +212,7 @@ Spanner::set_bound (Direction d, Grob *s)
       original parent for alignment.
       This happens e.g. for MultiMeasureRestNumbers and PercentRepeatCounters.
     */
-    if (!dynamic_cast <Spanner *> (this->get_parent (X_AXIS)))
+    if (!dynamic_cast <Spanner *> (get_parent (X_AXIS)))
       set_parent (i, X_AXIS);
 
   /*
@@ -364,7 +366,7 @@ MAKE_SCHEME_CALLBACK (Spanner, set_spacing_rods, 1);
 SCM
 Spanner::set_spacing_rods (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   SCM num_length = me->get_property ("minimum-length");
   SCM broken_length = me->get_property ("minimum-length-after-break");
   if (scm_is_number (num_length)
@@ -437,7 +439,7 @@ MAKE_SCHEME_CALLBACK (Spanner, calc_normalized_endpoints, 1);
 SCM
 Spanner::calc_normalized_endpoints (SCM smob)
 {
-  Spanner *me = Spanner::unsmob (smob);
+  Spanner *me = unsmob<Spanner> (smob);
   SCM result = SCM_EOL;
 
   Spanner *orig = dynamic_cast<Spanner *> (me->original ());
@@ -484,7 +486,7 @@ MAKE_SCHEME_CALLBACK (Spanner, bounds_width, 1);
 SCM
 Spanner::bounds_width (SCM grob)
 {
-  Spanner *me = Spanner::unsmob (grob);
+  Spanner *me = unsmob<Spanner> (grob);
 
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
 
@@ -500,7 +502,7 @@ MAKE_SCHEME_CALLBACK (Spanner, kill_zero_spanned_time, 1);
 SCM
 Spanner::kill_zero_spanned_time (SCM grob)
 {
-  Spanner *me = Spanner::unsmob (grob);
+  Spanner *me = unsmob<Spanner> (grob);
   /*
     Remove the line or hairpin at the start of the line.  For
     piano voice indicators, it makes no sense to have them at
@@ -533,7 +535,7 @@ Spanner::get_cached_pure_property (SCM sym, int start, int end)
   // The pure property cache is indexed by (name start . end), where name is
   // a symbol, and start and end are numbers referring to the starting and
   // ending column ranks of the current line.
-  if (scm_hash_table_p (pure_property_cache_) == SCM_BOOL_F)
+  if (scm_is_false (scm_hash_table_p (pure_property_cache_)))
     return SCM_UNDEFINED;
 
   SCM key = scm_cons (sym, scm_cons (scm_from_int (start), scm_from_int (end)));
@@ -543,7 +545,7 @@ Spanner::get_cached_pure_property (SCM sym, int start, int end)
 void
 Spanner::cache_pure_property (SCM sym, int start, int end, SCM val)
 {
-  if (scm_hash_table_p (pure_property_cache_) == SCM_BOOL_F)
+  if (scm_is_false (scm_hash_table_p (pure_property_cache_)))
     pure_property_cache_ = scm_c_make_hash_table (17);
 
   SCM key = scm_cons (sym, scm_cons (scm_from_int (start), scm_from_int (end)));