Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(204)

Unified Diff: lily/ledger-line-spanner.cc

Issue 6109046: Macro for(UP_and_DOWN) and 3 similar. (issue 2491) (Closed) Base URL: http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Patch Set: Corrected GNU style in for (*_and_* (d)) macros. Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/item.cc ('k') | lily/line-spanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/ledger-line-spanner.cc
diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc
index 83304acff7a4b39cd2a814827f4bf5b24d9da083..20e4b59fc34f2bfd9312dabc7c1408ed3210d700 100644
--- a/lily/ledger-line-spanner.cc
+++ b/lily/ledger-line-spanner.cc
@@ -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
« no previous file with comments | « lily/item.cc ('k') | lily/line-spanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b