X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspacing-loose-columns.cc;h=32ffe220322990408a2c00a19222bc4142b7983c;hb=c8d62eca2d025e1fdce22f478f87c10f414d4b9d;hp=aad9dd0db7d089b36161838ebf2bb65bbe5dad0b;hpb=809acd76be2af232cb4cbc43f86dad820bf97ae0;p=lilypond.git diff --git a/lily/spacing-loose-columns.cc b/lily/spacing-loose-columns.cc index aad9dd0db7..32ffe22032 100644 --- a/lily/spacing-loose-columns.cc +++ b/lily/spacing-loose-columns.cc @@ -28,6 +28,8 @@ #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 @@ -60,8 +62,8 @@ set_loose_columns (System *which, Column_x_positions const *posns) if (!loose->get_system ()) break; - Paper_column *le = derived_unsmob (scm_car (between)); - Paper_column *re = derived_unsmob (scm_cdr (between)); + Paper_column *le = unsmob (scm_car (between)); + Paper_column *re = unsmob (scm_cdr (between)); if (! (le && re)) break; @@ -135,8 +137,8 @@ set_loose_columns (System *which, Column_x_positions const *posns) Paper_column *loose_col = dynamic_cast (clique[j]); Paper_column *next_col = dynamic_cast (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 (clique_col->get_object ("spacing")); + if (Grob *grace_spacing = unsmob (clique_col->get_object ("grace-spacing"))) { spacing = grace_spacing; } @@ -155,7 +157,7 @@ set_loose_columns (System *which, Column_x_positions const *posns) { Spring spring = Spacing_spanner::note_spacing (spacing, loose_col, next_col, &options); - if (Note_spacing::has_interface (spacing)) + if (has_interface (spacing)) spring = Note_spacing::get_spacing (spacing, next_col, spring, options.increment_); @@ -173,8 +175,8 @@ set_loose_columns (System *which, Column_x_positions const *posns) } 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); @@ -193,7 +195,7 @@ set_loose_columns (System *which, Column_x_positions const *posns) 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 (clique[j]);