From 7e771a83cafb00e0ed58400a93b728e283c4ad9c Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Wed, 13 Nov 2013 17:10:32 -0800 Subject: [PATCH] optimal-page-breaking: signed/unsigned bug; issue 1553 --- lily/optimal-page-breaking.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lily/optimal-page-breaking.cc b/lily/optimal-page-breaking.cc index 3bddcad4ba..8142c39f7a 100644 --- a/lily/optimal-page-breaking.cc +++ b/lily/optimal-page-breaking.cc @@ -51,7 +51,7 @@ Optimal_page_breaking::solve () vsize page_count = robust_scm2int (forced_page_count, 1); Line_division ideal_line_division = current_configuration (0); Line_division best_division = ideal_line_division; - vsize min_sys_count = 1; + int min_sys_count = 1; // Note that system_count () only counts non-title systems. vsize ideal_sys_count = system_count (); @@ -75,7 +75,7 @@ Optimal_page_breaking::solve () if (page_count > 1 && best.systems_per_page_[page_count - 2] > 1) min_sys_count -= best.systems_per_page_[page_count - 2]; - min_sys_count = max (min_sys_count, (vsize)1); + min_sys_count = max (min_sys_count, 1); } } else @@ -117,7 +117,7 @@ Optimal_page_breaking::solve () /* try a smaller number of systems than the ideal number for line breaking */ Line_division bound = ideal_line_division; - for (vsize sys_count = ideal_sys_count + 1; --sys_count >= min_sys_count;) + for (vsize sys_count = ideal_sys_count + 1; --sys_count >= (vsize) min_sys_count;) { Page_spacing_result best_for_this_sys_count; set_current_breakpoints (0, end, sys_count, Line_division (), bound); -- 2.39.5