]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/horizontal-bracket.cc
Run grand replace for 2015.
[lilypond.git] / lily / horizontal-bracket.cc
index 7f3c839e9121bb261c2487e57ab7c007e0c5d58e..df8b79173b774cdb3cb793bc43d7bf997afc1341 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2002--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2002--2015 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
@@ -53,8 +53,7 @@ Horizontal_bracket::make_bracket (Grob *me,
     = robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
                            Drul_array<bool> (false, false));
 
-  Direction d = LEFT;
-  do
+  for (LEFT_and_RIGHT (d))
     {
       if (connect_to_other[d])
         {
@@ -63,7 +62,6 @@ Horizontal_bracket::make_bracket (Grob *me,
           shorten[d] = 0.0;
         }
     }
-  while (flip (&d) != LEFT);
 
   /*
     ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
@@ -103,7 +101,7 @@ MAKE_SCHEME_CALLBACK (Horizontal_bracket, print, 1);
 SCM
 Horizontal_bracket::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   extract_grob_set (me, "columns", gs);
 
   vector<Grob *> enclosed = gs;
@@ -113,14 +111,12 @@ Horizontal_bracket::print (SCM smob)
       return SCM_EOL;
     }
 
-  Direction d = LEFT;
-  do
+  for (LEFT_and_RIGHT (d))
     {
       Item *b = me->get_bound (d);
       if (b->break_status_dir ())
         enclosed.push_back (b);
     }
-  while (flip (&d) != LEFT);
 
   Stencil b = make_enclosing_bracket (me, me, enclosed, X_AXIS, get_grob_direction (me));
   return b.smobbed_copy ();