- {
- Grob *right_neighbor = unsmob_grob (c->get_object ("right-neighbor"));
- Grob *left_neighbor = unsmob_grob (c->get_object ("left-neighbor"));
-
- /*
- Either object can be non existent, if the score ends
- prematurely.
- */
- if (!right_neighbor || !left_neighbor)
- {
- 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 ()));
- }
- else
- {
- c->set_object ("between-cols", scm_cons (left_neighbor->self_scm (),
- right_neighbor->self_scm ()));
-
-
- /*
- Set distance constraints for loose columns
- */
- Drul_array<Item *> next_door (dynamic_cast<Item*> (cols->at (i - 1)),
- dynamic_cast<Item*> (cols->at (i + 1)));
-
- set_distances_for_loose_col (me, c, next_door, options);
- }
- }
-
- if (!loose)
- newcols.push_back (c);
+ {
+ Grob *right_neighbor = unsmob<Grob> (c->get_object ("right-neighbor"));
+ Grob *left_neighbor = unsmob<Grob> (c->get_object ("left-neighbor"));
+
+ /*
+ Either object can be non existent, if the score ends
+ prematurely.
+ */
+ if (!right_neighbor || !left_neighbor)
+ {
+ 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 ()));
+ }
+ else
+ {
+ c->set_object ("between-cols", scm_cons (left_neighbor->self_scm (),
+ right_neighbor->self_scm ()));
+
+ /*
+ Set distance constraints for loose columns
+ */
+ Drul_array<Item *> next_door (dynamic_cast<Item *> (left_neighbor),
+ dynamic_cast<Item *> (right_neighbor));
+
+ set_distances_for_loose_col (me, c, next_door, options);
+ }
+ }
+
+ else
+ newcols.push_back (c);