X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-spacing.cc;h=c8e51f56f8ee4585ac4b5242c4151e238dd1d3b6;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=52dedd5d77605a4c07929e92971e10fe7c69a3e1;hpb=cb0b407e567feca71cbc5f9479a06b266c69a26c;p=lilypond.git diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 52dedd5d77..c8e51f56f8 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -20,6 +20,7 @@ #include "staff-spacing.hh" #include +using namespace std; #include "international.hh" #include "paper-column.hh" @@ -33,9 +34,6 @@ #include "pointer-group-interface.hh" #include "directional-element-interface.hh" -using std::string; -using std::vector; - /* A stem following a bar-line creates an optical illusion similar to the one mentioned in note-spacing.cc. We correct for it here. @@ -61,7 +59,7 @@ Staff_spacing::optical_correction (Grob *me, Grob *g, Interval bar_height) stem_posns.intersect (bar_height); - ret = std::min (abs (stem_posns.length () / 7.0), 1.0); + ret = min (abs (stem_posns.length () / 7.0), 1.0); ret *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1); } } @@ -105,7 +103,7 @@ Staff_spacing::next_notes_correction (Grob *me, Real max_optical = 0.0; for (vsize i = 0; i < note_columns.size (); i++) - max_optical = std::max (max_optical, optical_correction (me, note_columns[i], bar_size)); + max_optical = max (max_optical, optical_correction (me, note_columns[i], bar_size)); return max_optical; } @@ -180,10 +178,10 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col, Real situational_space) ideal = fixed + distance / 2; } else if (scm_is_eq (type, ly_symbol2scm ("minimum-space"))) - ideal = last_ext[LEFT] + std::max (last_ext.length (), distance); + ideal = last_ext[LEFT] + max (last_ext.length (), distance); else if (scm_is_eq (type, ly_symbol2scm ("minimum-fixed-space"))) { - fixed = last_ext[LEFT] + std::max (last_ext.length (), distance); + fixed = last_ext[LEFT] + max (last_ext.length (), distance); ideal = fixed; } @@ -200,13 +198,13 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col, Real situational_space) Real min_dist = Paper_column::minimum_distance (left_col, right_col); /* ensure that the "fixed" distance will leave a gap of at least 0.3 ss. */ - Real min_dist_correction = std::max (0.0, 0.3 + min_dist - fixed); + Real min_dist_correction = max (0.0, 0.3 + min_dist - fixed); fixed += min_dist_correction; - ideal = std::max (ideal, fixed); + ideal = max (ideal, fixed); Spring ret (ideal, min_dist); - ret.set_inverse_stretch_strength (std::max (0.0, stretchability)); - ret.set_inverse_compress_strength (std::max (0.0, ideal - fixed)); + ret.set_inverse_stretch_strength (max (0.0, stretchability)); + ret.set_inverse_compress_strength (max (0.0, ideal - fixed)); return ret; }