X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-turn-page-breaking.cc;h=75e1a3bbf28204e5d6a52e36fba7a793d27ec020;hb=7ce72b4325ac54d7f26770430d9bd632cb9cdb29;hp=d17e6a86a3d34c8d86202729380940d563f9c76f;hpb=feb23985504e99693ff87201cd26bf78282506ed;p=lilypond.git diff --git a/lily/page-turn-page-breaking.cc b/lily/page-turn-page-breaking.cc index d17e6a86a3..75e1a3bbf2 100644 --- a/lily/page-turn-page-breaking.cc +++ b/lily/page-turn-page-breaking.cc @@ -61,7 +61,7 @@ Page_turn_page_breaking::put_systems_on_pages (vsize start, min_p_count has that evenness. (For example, if PAGE-NUMBER is even and min_p_count is even, we don't even consider the blank page option). */ - Spacing_result result; + Page_spacing_result result; if (start == 0 && auto_first) { if (min_p_count % 2) @@ -93,13 +93,13 @@ Page_turn_page_breaking::put_systems_on_pages (vsize start, return ret; } -/* "final page" meaning the number of the final right-hand page, - which always has an odd page number */ +/* The number of pages taken up by a Break_node, including + the blank page if there is one */ vsize -Page_turn_page_breaking::final_page_num (Break_node const &b) +Page_turn_page_breaking::total_page_count (Break_node const &b) { vsize end = b.first_page_number_ + b.page_count_; - return end - 1 + (end % 2); + return end - 1 + (end % 2) - b.first_page_number_; } extern bool debug_page_breaking_scoring; @@ -160,7 +160,7 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint) if (isinf (cur.demerits_) || (cur.page_count_ + (p_num % 2) > 2 && (!isinf (this_start_best.demerits_)) - && final_page_num (cur) > final_page_num (this_start_best))) + && total_page_count (cur) > total_page_count (this_start_best))) { ok_page = false; break;