]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-determine-loose-columns.cc
Issue 3450: \addlyrics doesn't work with TabStaff
[lilypond.git] / lily / spacing-determine-loose-columns.cc
index a195495529d25046fcc088b7b8f0a60c81aefcd2..2deae13b27dbf59568f8263e07c7c69e0e5748ba 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2005--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
@@ -134,10 +134,9 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
                                               Drul_array<Item *> next_door,
                                               Spacing_options const *options)
 {
-  Direction d = LEFT;
   Drul_array<Real> dists (0, 0);
 
-  do
+  for (LEFT_and_RIGHT (d))
     {
       Item *lc = dynamic_cast<Item *> ((d == LEFT) ? next_door[LEFT] : c);
       Item *rc = dynamic_cast<Item *> (d == LEFT ? c : next_door[RIGHT]);
@@ -171,7 +170,6 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
             programming_error ("Subversive spacing wish");
         }
     }
-  while (flip (&d) != LEFT);
 
   Rod r;
   r.distance_ = dists[LEFT] + dists[RIGHT];
@@ -230,7 +228,7 @@ Spacing_spanner::prune_loose_columns (Grob *me,
           */
           if (!right_neighbor || !left_neighbor)
             {
-              c->programming_error ("Cannot determine neighbors for floating column. ");
+              c->programming_error ("Cannot determine neighbors for floating column.");
               c->set_object ("between-cols", scm_cons (cols->at (i - 1)->self_scm (),
                                                        cols->at (i + 1)->self_scm ()));
             }