]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/simple-spacer.cc
unsmob_pitch -> Pitch::unsmob and related
[lilypond.git] / lily / simple-spacer.cc
index aef524da87579bb2ecb1e087409f0f2da04baa3f..e21cbbf0ef7db494d40704cbf5db3b230ed55066 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1999--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   TODO:
   - add support for different stretch/shrink constants?
@@ -193,7 +193,7 @@ Simple_spacer::expand_line ()
     inv_hooke += springs_[i].inverse_stretch_strength ();
 
   if (inv_hooke == 0.0) /* avoid division by zero. If springs are infinitely stiff */
-    return 0.0;         /* anyway, then it makes no difference what the force is */
+    inv_hooke = 1e-6;   /* then report a very large stretching force */
 
   assert (cur_len <= line_len_);
   return (line_len_ - cur_len) / inv_hooke + force_;
@@ -380,7 +380,7 @@ get_column_description (vector<Grob *> const &cols, vsize col_index, bool line_s
   for (SCM s = Spaceable_grob::get_minimum_distances (col);
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Grob *other = unsmob_grob (scm_caar (s));
+      Grob *other = Grob::unsmob (scm_caar (s));
       vsize j = binary_search (cols, other, Paper_column::less_than, col_index);
       if (j != VPOS)
         {