source file of the GNU LilyPond music typesetter
- (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "gourlay-breaking.hh"
-#include <math.h> // rint
+#include <cmath> // rint
#include <cstdio>
+using namespace std;
#include "warn.hh"
#include "main.hh"
if (be_verbose_global)
{
message (_f ("Optimal demerits: %f",
- optimal_paths.top ().demerits_) + "\n");
+ optimal_paths.top ().demerits_) + "\n");
}
if (optimal_paths.top ().demerits_ >= infinity_f)
{
Real break_penalties = 0.0;
Grob *pc = this_one.cols_.top ();
- if (pc->original_)
+ if (pc->original ())
{
SCM pen = pc->get_property ("penalty");
if (scm_is_number (pen) && fabs (scm_to_double (pen)) < 10000)
- {
- break_penalties += scm_to_double (pen);
- }
+ break_penalties += scm_to_double (pen);
}
/*
add 20000 to the demerits, so that a break penalty
of -10000 won't change the result */
- demerit = (demerit + 20000) >? 2000;
+ demerit = max ((demerit + 20000), 2000.0);
demerit *= 10;
}