X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftie.cc;h=aaac5fbbd484433bf7498315d7fc7ec3971fbb3c;hb=31ae5880931a923a88c3a12a66d113436dfb97af;hp=b52f84db0f7b391a7aaf1f4524b7010f2f3305db;hpb=bb8a0a5387af94dd2702877256334b160575a730;p=lilypond.git diff --git a/lily/tie.cc b/lily/tie.cc index b52f84db0f..aaac5fbbd4 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,14 +92,12 @@ 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 @@ -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]) { @@ -189,7 +185,6 @@ Tie::get_default_control_points (Grob *me_grob) Tie_formatting_problem problem; problem.from_tie (me); - Tie_specification spec = problem.get_tie_specification (0); if (!me->is_live ()) return SCM_EOL;