]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lookup.cc
* mf/GNUmakefile ($(NCSB_TTFS)): revise rule. Create
[lilypond.git] / lily / lookup.cc
index 14efd34fe54c8e105685be2b79e6e53ac50a4f9a..9465463a0c425228b2264e9d4774b16b6c9f8cf4 100644 (file)
@@ -3,15 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "lookup.hh"
 
-#include <math.h>
+#include <cmath>
 #include <cctype>
+using namespace std;
 
 #include "line-interface.hh"
 #include "warn.hh"
@@ -96,9 +97,7 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash_period, Real dash_fraction)
   Real off = dash_period - on;
 
   for (int i = 4; i--;)
-    {
-      l = scm_cons (ly_offset2scm (b.control_[i]), l);
-    }
+    l = scm_cons (ly_offset2scm (b.control_[i]), l);
 
   SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
                        scm_from_double (thick),
@@ -172,13 +171,9 @@ Stencil
 Lookup::round_filled_box (Box b, Real blotdiameter)
 {
   if (b.x ().length () < blotdiameter)
-    {
-      blotdiameter = b.x ().length ();
-    }
+    blotdiameter = b.x ().length ();
   if (b.y ().length () < blotdiameter)
-    {
-      blotdiameter = b.y ().length ();
-    }
+    blotdiameter = b.y ().length ();
 
   SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
                        scm_from_double (-b[X_AXIS][LEFT]),
@@ -370,9 +365,9 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
 
   SCM scontrols[8];
 
-  for (int i = 4; i--;)
-    scontrols[ i ] = ly_offset2scm (back.control_[i]);
-  for (int i = 4; i--;)
+  for (int i = 0; i < 4; i++)
+    scontrols[i] = ly_offset2scm (back.control_[i]);
+  for (int i = 0; i < 4; i++)
     scontrols[i + 4] = ly_offset2scm (curve.control_[i]);
 
   /*
@@ -381,9 +376,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   int indices[] = {5, 6, 7, 4, 1, 2, 3, 0};
   SCM list = SCM_EOL;
   for (int i = 8; i--;)
-    {
-      list = scm_cons (scontrols[indices[i]], list);
-    }
+    list = scm_cons (scontrols[indices[i]], list);
 
   SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                        ly_quote_scm (list),
@@ -662,7 +655,6 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   Offset p1 (0, 0);
   Offset p2 (w, w * s);
 
-
   return Lookup::round_filled_polygon (points, blotdiameter);
 #endif