#include "moment.hh"
#include "spacing-options.hh"
+using std::vector;
+
/* Find the loose columns in POSNS, and drape them around the columns
specified in BETWEEN-COLS. */
void
if (!loose->get_system ())
break;
- Paper_column *le = dynamic_cast<Paper_column *> (Grob::unsmob (scm_car (between)));
- Paper_column *re = dynamic_cast<Paper_column *> (Grob::unsmob (scm_cdr (between)));
+ Paper_column *le = unsmob<Paper_column> (scm_car (between));
+ Paper_column *re = unsmob<Paper_column> (scm_cdr (between));
if (! (le && re))
break;
Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
- Grob *spacing = Grob::unsmob (clique_col->get_object ("spacing"));
- if (Grob *grace_spacing = Grob::unsmob (clique_col->get_object ("grace-spacing")))
+ Grob *spacing = unsmob<Grob> (clique_col->get_object ("spacing"));
+ if (Grob *grace_spacing = unsmob<Grob> (clique_col->get_object ("grace-spacing")))
{
spacing = grace_spacing;
}
{
Spring spring = Spacing_spanner::note_spacing (spacing, loose_col,
next_col, &options);
- if (Note_spacing::has_interface (spacing))
+ if (has_interface<Note_spacing> (spacing))
spring = Note_spacing::get_spacing (spacing, next_col,
spring, options.increment_);
}
Real loose_col_horizontal_length = loose_col->extent (loose_col, X_AXIS).length ();
- base_note_space = max (base_note_space, loose_col_horizontal_length);
- tight_note_space = max (tight_note_space, loose_col_horizontal_length);
+ base_note_space = std::max (base_note_space, loose_col_horizontal_length);
+ tight_note_space = std::max (tight_note_space, loose_col_horizontal_length);
clique_spacing.push_back (base_note_space);
clique_tight_spacing.push_back (tight_note_space);
sum_tight_spacing += clique_tight_spacing[j];
sum_spacing += clique_spacing[j];
}
- Real scale_factor = max (0.0, min (1.0, (permissible_distance - left_padding - sum_tight_spacing) / (sum_spacing - sum_tight_spacing)));
+ Real scale_factor = std::max (0.0, std::min (1.0, (permissible_distance - left_padding - sum_tight_spacing) / (sum_spacing - sum_tight_spacing)));
for (vsize j = clique.size () - 2; j > 0; j--)
{
Paper_column *clique_col = dynamic_cast<Paper_column *> (clique[j]);