]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/self-alignment-interface.cc
Doc: removing a left over html tag in a snippet
[lilypond.git] / lily / self-alignment-interface.cc
index edf0b2395dbd6a533255a921cf8c17037e634519..a37b5871007eec8ef9368976958997b6a4c84a98 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--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
@@ -59,9 +59,7 @@ Self_alignment_interface::aligned_on_self (Grob *me, Axis a, bool pure, int star
   if (scm_is_number (align))
     {
       Interval ext (me->maybe_pure_extent (me, a, pure, start, end));
-      if (ext.is_empty ())
-        programming_error ("cannot align on self: empty element");
-      else
+      if (!ext.is_empty ())
         return scm_from_double (- ext.linear_combination (scm_to_double (align)));
     }
   return scm_from_double (0.0);
@@ -219,8 +217,8 @@ Self_alignment_interface::avoid_colliding_grobs (Grob *me, Axis a, Real offset)
                       : LEFT;
 
   return scm_from_double ((pos[col_dir] - (iv.length () / 2)
-                          + col_dir
-                          * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
+                           + col_dir
+                           * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
 }
 
 void