From: Han-Wen Nienhuys Date: Tue, 6 Jan 2004 00:56:13 +0000 (+0000) Subject: * lily/include/scm-hash.hh (class Scheme_hash_table): idem. X-Git-Tag: release/2.1.23~277 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ff3d20fcb28e7ccf0fa9ad242dc16afb9cf0f7ba;p=lilypond.git * lily/include/scm-hash.hh (class Scheme_hash_table): idem. * flower/include/interval.hh: rename elem_b to contains * lily/lyric-extender.cc (brew_molecule): use heads for width, use minimum-length for short ones, and shorten so collisions with the next syllable are avoided. * lily/beam-quanting.cc (score_slopes_dy): add extra points for near-zero slopes. Only do DAMPING_DIRECTION_PENALTY for non-horizontal dy --- diff --git a/ChangeLog b/ChangeLog index f91929957c..903521b6ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-01-06 Han-Wen Nienhuys + * lily/include/scm-hash.hh (class Scheme_hash_table): idem. + + * flower/include/interval.hh: rename elem_b to contains + * lily/tie.cc: change 'heads to 'head-pair. * lily/lyric-phrasing-engraver.cc (process_acknowledged_grobs): diff --git a/flower/include/interval.hh b/flower/include/interval.hh index df96ce3966..413b6b78d5 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -92,7 +92,7 @@ struct Interval_t : public Drul_array { } String to_string () const; - bool elem_b (T r); + bool contains (T r); void negate () { T r = -elem (LEFT); T l = -elem (RIGHT); diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index 550a0a877c..aff6e7bf8d 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -457,7 +457,7 @@ Beam::score_forbidden_quants (Real yl, Real yr, gap.add_point (gap1); gap.add_point (gap2); - if (gap.elem_b (radius)) + if (gap.contains (radius)) dem += extra_demerit; } while ((flip (&d))!= LEFT); diff --git a/lily/beam.cc b/lily/beam.cc index 5361db25b5..03daef5faa 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1004,7 +1004,7 @@ Beam::shift_region_to_valid (SCM grob) { warning (_("Not sure that we can find a nice beam slope (no viable initial configuration found).")); } - else if (!feasible_left_point.elem_b(y)) + else if (!feasible_left_point.contains (y)) { if (isinf (feasible_left_point[DOWN])) y = feasible_left_point[UP] - REGION_SIZE; diff --git a/lily/include/scm-hash.hh b/lily/include/scm-hash.hh index f58304d834..289f9d779c 100644 --- a/lily/include/scm-hash.hh +++ b/lily/include/scm-hash.hh @@ -41,7 +41,7 @@ class Scheme_hash_table { public: bool try_retrieve (SCM key, SCM *val); - bool elem_b (SCM key) const; + bool contains (SCM key) const; /** WARNING: putting something in assumes responsibility for cleaning diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index 1a49a39b54..60d8fbbe7d 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -93,7 +93,7 @@ Scheme_hash_table::try_retrieve (SCM k, SCM *v) } bool -Scheme_hash_table::elem_b (SCM k) const +Scheme_hash_table::contains (SCM k) const { return ly_pair_p (scm_hashq_get_handle (hash_tab_, k)); } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 4a6109881a..b9b3b33ded 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -264,7 +264,7 @@ Translator_group::each (Method_pointer method) Translator_group* Translator_group::where_defined (SCM sym) const { - if (properties_dict ()->elem_b (sym)) + if (properties_dict ()->contains (sym)) { return (Translator_group*)this; }