]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
Clean fonts and docs makefiles, trying to fix 'make -j' race conditions
[lilypond.git] / lily / tie.cc
index 078d4fc5dd2f09423f3a23ae50a7305e093bf089..23e8d4c7da958eee36186e169c4a6f453bd471c2 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2012 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
@@ -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<Grob *> stems;
-  Direction d = LEFT;
-  do
+  for (LEFT_and_RIGHT (d))
     {
       Grob *one_head = head (me, d);
       if (!one_head && dynamic_cast<Spanner *> (me))
@@ -138,7 +135,6 @@ Tie::get_default_dir (Grob *me)
 
       stems[d] = stem;
     }
-  while (flip (&d) != LEFT);
 
   if (stems[LEFT] && stems[RIGHT])
     {