source file of the GNU LilyPond music typesetter
- (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "beaming.hh"
int
Beaming_info_list::best_splitpoint_index (Moment &beat_length, bool subdivide) const
{
- int minden = INT_MAX;
+ int minden = INT_MAX;
int minidx = -1;
Moment beat_pos;
Direction d = LEFT;
do
- {
- splits[d].beamify (beat_length, subdivide);
- }
- while (flip (&d) != LEFT);
+ splits[d].beamify (beat_length, subdivide);
+ while (flip (&d) != LEFT)
+ ;
int middle_beams = (split ? 1
: min (splits[RIGHT].beam_extend_count (LEFT),
infos_ = splits[LEFT].infos_;
infos_.concat (splits[RIGHT].infos_);
+
+ clip_edges ();
}
void
{
infos_.push (Beaming_info (m, b));
}
+
+void
+Beaming_info_list::clip_edges ()
+{
+ if (infos_.size ())
+ {
+ infos_[0].beams_i_drul_[LEFT] = 0;
+ infos_.top().beams_i_drul_[RIGHT] = 0;
+ }
+}