Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(77)

Delta Between Two Patch Sets: lily/page-layout-problem.cc

Issue 563460043: Make all int -> Real casts explicit (Closed)
Left Patch Set: Created 5 years, 1 month ago
Right Patch Set: static_cast Created 5 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lily/mensural-ligature-engraver.cc ('k') | lily/page-spacing-result.cc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 2009--2020 Joe Neeman <joeneeman@gmail.com> 4 Copyright (C) 2009--2020 Joe Neeman <joeneeman@gmail.com>
5 5
6 LilyPond is free software: you can redistribute it and/or modify 6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 Real overflow = spacer.configuration_length (spacer.force ()) 728 Real overflow = spacer.configuration_length (spacer.force ())
729 - page_height_; 729 - page_height_;
730 if (ragged && overflow < 1e-6) 730 if (ragged && overflow < 1e-6)
731 warning (_ ("ragged-bottom was specified, but page must be compressed")) ; 731 warning (_ ("ragged-bottom was specified, but page must be compressed")) ;
732 else 732 else
733 { 733 {
734 warning (_f ("compressing over-full page by %.1f staff-spaces", 734 warning (_f ("compressing over-full page by %.1f staff-spaces",
735 overflow)); 735 overflow));
736 force_ = -infinity_f; 736 force_ = -infinity_f;
737 vsize space_count = solution_.size (); 737 vsize space_count = solution_.size ();
738 Real spacing_increment = overflow / Real (space_count - 2); 738 Real spacing_increment
739 = overflow / static_cast<Real> (space_count - 2);
Dan Eble 2020/02/02 18:44:51 This isn't an issue with this change, but does any
739 for (vsize i = 2; i < space_count; i++) 740 for (vsize i = 2; i < space_count; i++)
740 solution_[i] -= Real (i - 1) * spacing_increment; 741 solution_[i] -= static_cast<Real> (i - 1) * spacing_increment;
741 } 742 }
742 } 743 }
743 } 744 }
744 745
745 Real 746 Real
746 Page_layout_problem::force () const 747 Page_layout_problem::force () const
747 { 748 {
748 return force_; 749 return force_;
749 } 750 }
750 751
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 { 1240 {
1240 if (has_interface<Hara_kiri_group_spanner> (input[i])) 1241 if (has_interface<Hara_kiri_group_spanner> (input[i]))
1241 Hara_kiri_group_spanner::consider_suicide (input[i]); 1242 Hara_kiri_group_spanner::consider_suicide (input[i]);
1242 1243
1243 if (input[i]->is_live ()) 1244 if (input[i]->is_live ())
1244 output.push_back (input[i]); 1245 output.push_back (input[i]);
1245 } 1246 }
1246 1247
1247 return output; 1248 return output;
1248 } 1249 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b