]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page-spacing.cc
Issue 4550 (2/2) Avoid "using namespace std;" in included files
[lilypond.git] / lily / page-spacing.cc
index a2915febb20197470a4e316436881f103a94e435..f9cb9540d1a0b51eb4f9507eaa99cadc8f044708 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2012 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2015 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -24,6 +24,8 @@
 #include "page-breaking.hh"
 #include "warn.hh"
 
+using std::vector;
+
 void
 Page_spacing::calc_force ()
 {
@@ -35,7 +37,7 @@ Page_spacing::calc_force ()
     force_ = -infinity_f;
   else
     force_ = (height - rod_height_ - last_line_.bottom_padding_ - spring_len_)
-             / max (0.1, inverse_spring_k_);
+             / std::max (0.1, inverse_spring_k_);
 }
 
 void
@@ -354,7 +356,7 @@ Page_spacer::calc_subproblem (vsize page, vsize line)
           // Clamp the demerits at BAD_SPACING_PENALTY, even if the page
           // is overfull.  This ensures that TERRIBLE_SPACING_PENALTY takes
           // precedence over overfull pages.
-          demerits = min (demerits, BAD_SPACING_PENALTY);
+          demerits = std::min (demerits, BAD_SPACING_PENALTY);
           demerits += (prev ? prev->demerits_ : 0);
 
           Real penalty = breaker_->line_count_penalty (line_count);
@@ -388,7 +390,8 @@ Page_spacer::calc_subproblem (vsize page, vsize line)
         }
 
       if (page_start > 0
-          && lines_[page_start - 1].page_permission_ == ly_symbol2scm ("force"))
+          && scm_is_eq (lines_[page_start - 1].page_permission_,
+                        ly_symbol2scm ("force")))
         break;
     }
   return !isinf (cur.demerits_);