]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page-turn-page-breaking.cc
Issue 4568: Check in Texinfo from upstream svn://svn.savannah.gnu.org/texinfo/trunk...
[lilypond.git] / lily / page-turn-page-breaking.cc
index 9008def09ab408f985bd086210585c8078edc660..daa060c939e72b58225ff03473b4be599c43b0b0 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2014 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
@@ -29,6 +29,9 @@
 #include "system.hh"
 #include "warn.hh"
 
+using std::string;
+using std::vector;
+
 template<typename T>
 static bool
 is_break (T *g)
@@ -138,7 +141,8 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
   for (vsize start = end; start--;)
     {
       if (start < end - 1
-          && breakpoint_property (start + 1, "page-turn-permission") == ly_symbol2scm ("force"))
+          && scm_is_eq (breakpoint_property (start + 1, "page-turn-permission"),
+                        ly_symbol2scm ("force")))
         break;
 
       if (start > 0 && best.demerits_ < state_[start - 1].demerits_)
@@ -169,7 +173,7 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
 
       /* heuristic: we've just added a breakpoint, we'll need at least as
          many systems as before */
-      min_sys_count = max (min_sys_count, prev_best_system_count);
+      min_sys_count = std::max (min_sys_count, prev_best_system_count);
       for (vsize sys_count = min_sys_count; sys_count <= max_sys_count && ok_page; sys_count++)
         {
           set_current_breakpoints (start, end, sys_count, min_division, max_division);