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

Unified Diff: lily/side-position-interface.cc

Issue 549480043: Run scripts/auxiliar/fixcc.py (Closed)
Patch Set: Created 5 years, 1 month 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/separating-line-group-engraver.cc ('k') | lily/simple-spacer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/side-position-interface.cc
diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc
index d540b12bff6e472a1491b32d78386bea8a45dfa5..6b5db5cabe5af1f4c7fc1accfd7bc70c8decfd9b 100644
--- a/lily/side-position-interface.cc
+++ b/lily/side-position-interface.cc
@@ -24,7 +24,6 @@
#include <set>
#include <map>
-
#include "accidental-interface.hh"
#include "accidental-placement.hh"
#include "axis-group-interface.hh"
@@ -145,7 +144,7 @@ Side_position_interface::calc_cross_staff (SCM smob)
Grob *me = unsmob<Grob> (smob);
extract_grob_set (me, "side-support-elements", elts);
- Direction my_dir = get_grob_direction (me) ;
+ Direction my_dir = get_grob_direction (me);
for (vsize i = 0; i < elts.size (); i++)
{
@@ -156,7 +155,7 @@ Side_position_interface::calc_cross_staff (SCM smob)
cross-staff.
*/
if (to_boolean (elts[i]->get_property ("cross-staff"))
- && !is_direction (elts[i]->get_property_data ("direction")))
+ && !is_direction (elts[i]->get_property_data ("direction")))
return SCM_BOOL_T;
/*
@@ -166,7 +165,7 @@ Side_position_interface::calc_cross_staff (SCM smob)
and thus we mark 'me' as cross-staff.
*/
if (to_boolean (elts[i]->get_property ("cross-staff"))
- && my_dir == get_grob_direction (elts[i]))
+ && my_dir == get_grob_direction (elts[i]))
return SCM_BOOL_T;
}
@@ -204,8 +203,8 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
common[ax] = common_refpoint_of_array (support,
(ax == a
- ? me->get_parent (ax)
- : me),
+ ? me->get_parent (ax)
+ : me),
ax);
Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me);
@@ -252,7 +251,6 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
else
me->warning ("cannot find skylines - strange alignment will follow");
-
vector<Box> boxes;
vector<Skyline_pair> skyps;
set<Grob *>::iterator it;
@@ -280,33 +278,33 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
if (e)
{
- SCM sp = e->get_maybe_pure_property (a == X_AXIS
- ? "horizontal-skylines"
- : "vertical-skylines",
- pure,
- start,
- end);
-
- if (unsmob<Skyline_pair> (sp))
- {
- Real xc = pure && dynamic_cast<Spanner *> (e)
- ? e->parent_relative (common[X_AXIS], X_AXIS)
- : e->relative_coordinate (common[X_AXIS], X_AXIS);
- // same logic as above
- // we assume horizontal spacing is always pure
- Real yc = a == X_AXIS
- ? e->pure_relative_y_coordinate (common[Y_AXIS], start, end)
- : e->maybe_pure_coordinate (common[Y_AXIS], Y_AXIS, pure, start, end);
- Skyline_pair copy = *unsmob<Skyline_pair> (sp);
- if (a == Y_AXIS
- && has_interface<Stem> (e)
- && to_boolean (me->get_maybe_pure_property ("add-stem-support", pure, start, end)))
- copy[dir].set_minimum_height (copy[dir].max_height ());
- copy.shift (a == X_AXIS ? yc : xc);
- copy.raise (a == X_AXIS ? xc : yc);
- skyps.push_back (copy);
- }
- else { /* no warning*/ }
+ SCM sp = e->get_maybe_pure_property (a == X_AXIS
+ ? "horizontal-skylines"
+ : "vertical-skylines",
+ pure,
+ start,
+ end);
+
+ if (unsmob<Skyline_pair> (sp))
+ {
+ Real xc = pure && dynamic_cast<Spanner *> (e)
+ ? e->parent_relative (common[X_AXIS], X_AXIS)
+ : e->relative_coordinate (common[X_AXIS], X_AXIS);
+ // same logic as above
+ // we assume horizontal spacing is always pure
+ Real yc = a == X_AXIS
+ ? e->pure_relative_y_coordinate (common[Y_AXIS], start, end)
+ : e->maybe_pure_coordinate (common[Y_AXIS], Y_AXIS, pure, start, end);
+ Skyline_pair copy = *unsmob<Skyline_pair> (sp);
+ if (a == Y_AXIS
+ && has_interface<Stem> (e)
+ && to_boolean (me->get_maybe_pure_property ("add-stem-support", pure, start, end)))
+ copy[dir].set_minimum_height (copy[dir].max_height ());
+ copy.shift (a == X_AXIS ? yc : xc);
+ copy.raise (a == X_AXIS ? xc : yc);
+ skyps.push_back (copy);
+ }
+ else { /* no warning*/ }
}
}
@@ -361,7 +359,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
if (current_off)
total_off = dir * std::max (dir * total_off,
- dir * (*current_off));
+ dir * (*current_off));
/* FIXME: 1000 should relate to paper size. */
if (fabs (total_off) > 1000)
« no previous file with comments | « lily/separating-line-group-engraver.cc ('k') | lily/simple-spacer.cc » ('j') | no next file with comments »

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