X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftie.cc;h=23e8d4c7da958eee36186e169c4a6f453bd471c2;hb=6671c51302bd71216a7d4c698c475e2abf0d78b4;hp=84dfa29a8239f76e2e6f946e29e2b5307051efca;hpb=d61cf3bbdb1c6670a127ba3baddf2f04d3e34fd3;p=lilypond.git diff --git a/lily/tie.cc b/lily/tie.cc index 84dfa29a82..23e8d4c7da 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -92,21 +92,19 @@ Tie::get_column_rank (Grob *me, Direction d) 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; } @@ -125,8 +123,7 @@ Direction Tie::get_default_dir (Grob *me) { Drul_array stems; - Direction d = LEFT; - do + for (LEFT_and_RIGHT (d)) { Grob *one_head = head (me, d); if (!one_head && dynamic_cast (me)) @@ -138,7 +135,6 @@ Tie::get_default_dir (Grob *me) stems[d] = stem; } - while (flip (&d) != LEFT); if (stems[LEFT] && stems[RIGHT]) {