X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsimple-spacer.cc;h=cf4fd5849e35601ad8cf839394d7f6d6ba407c8e;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=5244d33c9e6d58ba8a3da4ece88ff4467855b0bd;hpb=59a6d1a06432fc0ca88c3023c646182f389ec1b5;p=lilypond.git diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index 5244d33c9e..cf4fd5849e 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -32,8 +32,6 @@ #include "spring.hh" #include "warn.hh" -using std::vector; - /* A simple spacing constraint solver. The approach: @@ -127,9 +125,9 @@ Simple_spacer::add_rod (int l, int r, Real dist) return; } - force_ = std::max (force_, block_force); + force_ = max (force_, block_force); for (int i = l; i < r; i++) - springs_[i].set_blocking_force (std::max (block_force, springs_[i].blocking_force ())); + springs_[i].set_blocking_force (max (block_force, springs_[i].blocking_force ())); } Real @@ -225,7 +223,7 @@ Simple_spacer::compress_line () if (line_len_ > (1 + 1e-6) * cur_len) programming_error ("misuse of compress_line"); vector sorted_springs = springs_; - sort (sorted_springs.begin (), sorted_springs.end (), std::greater ()); + sort (sorted_springs.begin (), sorted_springs.end (), greater ()); /* inv_hooke is the total flexibility of currently-active springs */ double inv_hooke = 0; @@ -269,7 +267,7 @@ Simple_spacer::compress_line () void Simple_spacer::add_spring (Spring const &sp) { - force_ = std::max (force_, sp.blocking_force ()); + force_ = max (force_, sp.blocking_force ()); springs_.push_back (sp); } @@ -291,7 +289,7 @@ Simple_spacer::force_penalty (bool ragged) const but according to the amount of whitespace that is present after the end of the line. */ if (ragged) - return std::max (0.0, line_len_ - configuration_length (0.0)); + return max (0.0, line_len_ - configuration_length (0.0)); /* Use a convex compression penalty. */ Real f = force_; @@ -472,7 +470,7 @@ get_line_forces (vector const &columns, force[b * breaks.size () + c] = infinity_f; break; } - if (end < cols.size () && cols[end].break_permission_ == force_break) + if (end < cols.size () && scm_is_eq (cols[end].break_permission_, force_break)) break; } }