]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur.cc
lilypond-manuals.css: edit color scheme and some spacing
[lilypond.git] / lily / slur.cc
index ea3b4cf92283a785f3cf8fc5b1e1016446da2cdc..5f95e5d4d659203dbee12d58aa7d59c3aa69dd47 100644 (file)
@@ -43,9 +43,6 @@
 #include "unpure-pure-container.hh"
 #include "international.hh"
 
-using std::string;
-using std::vector;
-
 MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1)
 SCM
 Slur::calc_direction (SCM smob)
@@ -222,13 +219,8 @@ Slur::replace_breakable_encompass_objects (Grob *me)
         new_encompasses.push_back (g);
     }
 
-  SCM encompass_scm = me->get_object ("encompass-objects");
-  if (unsmob<Grob_array> (encompass_scm))
-    {
-      vector<Grob *> &arr
-        = unsmob<Grob_array> (encompass_scm)->array_reference ();
-      arr = new_encompasses;
-    }
+  if (Grob_array *a = unsmob<Grob_array> (me->get_object ("encompass-objects")))
+    a->set_array (new_encompasses);
 }
 
 Bezier
@@ -365,7 +357,7 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
         }
     }
 
-  Real avoidance_offset = do_shift ? curve.minmax (X_AXIS, std::max (xext[LEFT], curve.control_[0][X_AXIS] + EPS), std::min (xext[RIGHT], curve.control_[3][X_AXIS] - EPS), dir) - yext[-dir] : 0.0;
+  Real avoidance_offset = do_shift ? curve.minmax (X_AXIS, max (xext[LEFT], curve.control_[0][X_AXIS] + EPS), min (xext[RIGHT], curve.control_[3][X_AXIS] - EPS), dir) - yext[-dir] : 0.0;
 
   return scm_from_double (offset + avoidance_offset);
 }