Compile fix.
[lilypond.git] / lily / dot-formatting-problem.cc
blob3dae389c4d440629d203c908fa7260a8bce59307
1 /*
2 dot-formatting-problem.cc -- implement Dot_formatting_problem
5 file of the GNU LilyPond music typesetter
7 (c) 2007 Han-Wen Nienhuys <hanwen@lilypond.org>
9 */
11 #include "dot-formatting-problem.hh"
12 #include "dot-configuration.hh"
13 #include "skyline.hh"
15 Dot_formatting_problem::~Dot_formatting_problem()
17 delete best_;
20 void
21 Dot_formatting_problem::register_configuration (Dot_configuration const &src)
23 int b = src.badness ();
24 if (b < score_)
26 delete best_;
27 best_ = new Dot_configuration (src);
31 Dot_configuration *
32 Dot_formatting_problem::best () const
34 return best_;
37 Dot_formatting_problem::Dot_formatting_problem (vector<Box> const &boxes,
38 Interval base_x)
39 : head_skyline_ (boxes, 0.0, Y_AXIS, RIGHT)
41 best_ = 0;
42 head_skyline_.set_minimum_height (base_x[RIGHT]);
43 score_ = 1 << 30;