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

Unified Diff: lily/ottava-bracket.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/optimal-page-breaking.cc ('k') | lily/ottava-engraver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/ottava-bracket.cc
diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc
index cbe9928b6e977b12b31d4e31aa913c9e2c667232..f70a30b404e1125ed6ee252c1a820f581b8d52d6 100644
--- a/lily/ottava-bracket.cc
+++ b/lily/ottava-bracket.cc
@@ -56,8 +56,7 @@ Ottava_bracket::print (SCM smob)
Output_def *layout = me->layout ();
Drul_array<bool> broken;
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
Item *b = me->get_bound (d);
broken[d] = (b->break_status_dir () != CENTER);
@@ -75,7 +74,6 @@ Ottava_bracket::print (SCM smob)
}
}
}
- while (flip (&d) != LEFT);
SCM properties = Font_interface::text_font_alist_chain (me);
SCM markup = me->get_property ("text");
@@ -91,7 +89,7 @@ Ottava_bracket::print (SCM smob)
TODO: we should check if there are ledgers, and modify length of
the spanner to that.
*/
- do
+ for (LEFT_and_RIGHT (d))
{
Item *b = me->get_bound (d);
@@ -122,7 +120,6 @@ Ottava_bracket::print (SCM smob)
else
span_points[d] = ext[d];
}
- while (flip (&d) != LEFT);
/*
0.3 is ~ italic correction.
@@ -144,13 +141,12 @@ Ottava_bracket::print (SCM smob)
Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
Interval (0, 0));
- do
+ for (LEFT_and_RIGHT (d))
{
edge_height[d] *= -get_grob_direction (me);
if (broken[d])
edge_height[d] = 0.0;
}
- while (flip (&d) != LEFT);
Stencil b;
Interval empty;
« no previous file with comments | « lily/optimal-page-breaking.cc ('k') | lily/ottava-engraver.cc » ('j') | no next file with comments »

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