X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fledger-line-spanner.cc;h=20e4b59fc34f2bfd9312dabc7c1408ed3210d700;hb=5564a8ee55ff88bcad109ef80e204373d04c8375;hp=27388dde218d842b55ccb4e9d998569111d3710e;hpb=0c61221b46addec50e2406e04af44a7d460443d4;p=lilypond.git diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc index 27388dde21..20e4b59fc3 100644 --- a/lily/ledger-line-spanner.cc +++ b/lily/ledger-line-spanner.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2004--2011 Han-Wen Nienhuys + Copyright (C) 2004--2012 Han-Wen Nienhuys 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