]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/ledger-line-spanner.cc
Doc: removing a left over html tag in a snippet
[lilypond.git] / lily / ledger-line-spanner.cc
index 0e46e0d5b8f51b1013af8a2d6cefe1b59d6eb7e6..20e4b59fc34f2bfd9312dabc7c1408ed3210d700 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--2012 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
@@ -227,8 +227,7 @@ Ledger_line_spanner::print (SCM smob)
       if (last == reqs.end ())
         continue;
 
-      Direction d = DOWN;
-      do
+      for (DOWN_and_UP (d))
         {
           if (!staff_extent.contains (last->second[d].position_)
               && !staff_extent.contains (i->second[d].position_))
@@ -237,8 +236,7 @@ Ledger_line_spanner::print (SCM smob)
                 = (last->second[d].head_extent_[RIGHT]
                    + i->second[d].head_extent_[LEFT]) / 2;
 
-              Direction which = LEFT;
-              do
+              for (LEFT_and_RIGHT (which))
                 {
                   Ledger_request &lr = ((which == LEFT) ? * last : *i).second[d];
 
@@ -253,10 +251,8 @@ Ledger_line_spanner::print (SCM smob)
                   lr.ledger_extent_.at (-which)
                     = which * max (which * lr.ledger_extent_[-which], which * limit);
                 }
-              while (flip (&which) != LEFT);
             }
         }
-      while (flip (&d) != DOWN);
     }
 
   // create ledgers for note heads
@@ -295,8 +291,8 @@ Ledger_line_spanner::print (SCM smob)
                     Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
                     Real d
                       = linear_combination (Drul_array<Real> (accidental_size[RIGHT],
-                                                            head_size[LEFT]),
-                                          0.0);
+                                                              head_size[LEFT]),
+                                            0.0);
 
                     Real left_shorten = max (-ledger_size[LEFT] + d, 0.0);