]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/break-substitution.cc
Issue 2491: Macro for(UP_and_DOWN) and 3 similar.
[lilypond.git] / lily / break-substitution.cc
index 74314b39c03f71961b00fecddb41759ad6386667..a0f03f753cc5b9d873223b9bb61537b3383dd513 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2001--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2001--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
@@ -248,14 +248,12 @@ item_system_range (Item *it)
     return Slice (st->get_rank (), st->get_rank ());
 
   Slice sr;
-  Direction d = LEFT;
-  do
+  for (LEFT_and_RIGHT (d))
     {
       Item *bi = it->find_prebroken_piece (d);
       if (bi && bi->get_system ())
         sr.add_point (bi->get_system ()->get_rank ());
     }
-  while (flip (&d) != LEFT);
 
   return sr;
 }