Use for (DOWN_and_UP (d)) {...} instead.
Also replace the few uses of other_dir() with unary minus.
-other_dir (Direction const d)
+operator - (Direction d)
- return (Direction) (-d);
-}
-
-inline Direction
-operator - (Direction const d)
-{
- return other_dir (d);
-}
-
-// to be deleted soon (after coping with issues 2491 and 2493
-inline Direction
-flip (Direction *i)
-{
- if (*i == (Direction)1)
- *i = (Direction) - 1;
- else if (*i == (Direction) - 1)
- *i = (Direction)1;
- return *i;
+ return Direction (- static_cast<int> (d)); // cast avoids recursion
}
#define UP_and_DOWN(d) \
}
#define UP_and_DOWN(d) \
-// String direction_string (Direction, Axis);
-
for (int i = 0; i < 2; i++)
for (vsize i = 1; i < infos_.size () - 1; i++)
{
for (int i = 0; i < 2; i++)
for (vsize i = 1; i < infos_.size () - 1; i++)
{
- Direction non_flag_dir = other_dir (flag_directions[i]);
+ Direction non_flag_dir = -flag_directions[i];
if (non_flag_dir)
{
int importance = infos_[i + 1].rhythmic_importance_;
if (non_flag_dir)
{
int importance = infos_[i + 1].rhythmic_importance_;
VerticalAxisGroup of a staff) that extends over the break.
*/
Spanner *next_bound_parent_on_this_line
VerticalAxisGroup of a staff) that extends over the break.
*/
Spanner *next_bound_parent_on_this_line
- = next_bound_parent->broken_neighbor (other_dir (dir));
+ = next_bound_parent->broken_neighbor (-dir);
if (next_bound_parent_on_this_line)
{
if (next_bound_parent_on_this_line)
{
Offset left (x0, y0);
Offset right (x1, y1);
Offset dir = (right - left).direction ();
Offset left (x0, y0);
Offset right (x1, y1);
Offset dir = (right - left).direction ();
- Direction d = DOWN;
- do
{
Offset outward = d * get_normal ((thick / 2) * dir);
Offset inter_l = left + outward;
{
Offset outward = d * get_normal ((thick / 2) * dir);
Offset inter_l = left + outward;
- while (flip (&d) != DOWN);
Offset ep (cos (end) * x_rad, sin (end) * y_rad);
//////////////////////
Drul_array<vector<Offset> > points;
Offset ep (cos (end) * x_rad, sin (end) * y_rad);
//////////////////////
Drul_array<vector<Offset> > points;
int quantization = max (1, (int) (((x_rad * trans.xx) + (y_rad * trans.yy)) * M_PI / QUANTIZATION_UNIT));
int quantization = max (1, (int) (((x_rad * trans.xx) + (y_rad * trans.yy)) * M_PI / QUANTIZATION_UNIT));
{
for (vsize i = 0; i < 1 + (vsize) quantization; i++)
{
{
for (vsize i = 0; i < 1 + (vsize) quantization; i++)
{
points[d].push_back (inter);
}
}
points[d].push_back (inter);
}
}
- while (flip (&d) != DOWN);
for (vsize i = 0; i < points[DOWN].size () - 1; i++)
{
Box b;
for (vsize i = 0; i < points[DOWN].size () - 1; i++)
{
Box b;
{
b.add_point (points[d][i]);
b.add_point (points[d][i + 1]);
}
{
b.add_point (points[d][i]);
b.add_point (points[d][i + 1]);
}
- while (flip (&d) != DOWN);
pango_matrix_transform_point (&trans, &temp3[X_AXIS], &temp3[Y_AXIS]);
//////////////////////
Drul_array<vector<Offset> > points;
pango_matrix_transform_point (&trans, &temp3[X_AXIS], &temp3[Y_AXIS]);
//////////////////////
Drul_array<vector<Offset> > points;
int quantization = int (((temp1 - temp0).length ()
+ (temp2 - temp1).length ()
+ (temp3 - temp2).length ())
/ QUANTIZATION_UNIT);
int quantization = int (((temp1 - temp0).length ()
+ (temp2 - temp1).length ()
+ (temp3 - temp2).length ())
/ QUANTIZATION_UNIT);
{
Offset first = curve.control_[0]
+ d * get_normal ((th / 2) * curve.dir_at_point (0.0));
{
Offset first = curve.control_[0]
+ d * get_normal ((th / 2) * curve.dir_at_point (0.0));
pango_matrix_transform_point (&trans, &last[X_AXIS], &last[Y_AXIS]);
points[d].push_back (last);
}
pango_matrix_transform_point (&trans, &last[X_AXIS], &last[Y_AXIS]);
points[d].push_back (last);
}
- while (flip (&d) != DOWN);
for (vsize i = 0; i < points[DOWN].size () - 1; i++)
{
Box b;
for (vsize i = 0; i < points[DOWN].size () - 1; i++)
{
Box b;
{
b.add_point (points[d][i]);
b.add_point (points[d][i + 1]);
}
{
b.add_point (points[d][i]);
b.add_point (points[d][i + 1]);
}
- while (flip (&d) != DOWN);