/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
int
Tie::get_position (Grob *me)
{
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
Grob *h = head (me, d);
if (h)
return (int) rint (Staff_symbol_referencer::get_position (h));
}
- while (flip (&d) != LEFT);
/*
TODO: this is theoretically possible for ties across more than 2
systems.. We should look at the first broken copy.
*/
- programming_error ("Tie without heads. Suicide");
+ programming_error ("Tie without heads. Suicide");
me->suicide ();
return 0;
}
Tie::get_default_dir (Grob *me)
{
Drul_array<Grob *> stems;
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
Grob *one_head = head (me, d);
if (!one_head && dynamic_cast<Spanner *> (me))
stems[d] = stem;
}
- while (flip (&d) != LEFT);
if (stems[LEFT] && stems[RIGHT])
{
Tie_formatting_problem problem;
problem.from_tie (me);
- Tie_specification spec = problem.get_tie_specification (0);
if (!me->is_live ())
return SCM_EOL;